RTC Toolkit  1.0.0
logger.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_COMPONENTFRAMEWORK_LOGGER_HPP_
13 #define RTCTK_COMPONENTFRAMEWORK_LOGGER_HPP_
14 
15 #include <log4cplus/logger.h>
16 #include <log4cplus/loggingmacros.h>
17 
18 namespace rtctk::componentFramework {
19 
24 public:
27 };
28 
37 void LogConfigure(const std::string& cfg_file_name = "");
38 
47 void MakeLogger(const std::string& name,
48  log4cplus::LogLevel ll,
49  bool log_to_file = true,
50  bool additive = false);
51 
59 // Define which logger is retrieved when calling GetLogger() with any args
60 void SetDefaultLogger(const std::string& name);
61 
71 log4cplus::Logger& GetLogger(const std::string& name = "");
72 
73 } // namespace rtctk::componentFramework
74 
75 #endif
wscript.name
name
Definition: wscript:15
rtctk::componentFramework::MakeLogger
void MakeLogger(const std::string &name, log4cplus::LogLevel ll, bool log_to_file=true, bool additive=false)
Retrieve new logger programmatically.
rtctk::componentFramework::LogConfigure
void LogConfigure(const std::string &cfg_file_name="")
Initial logging system configuration.
rtctk::componentFramework
Definition: commandReplier.cpp:20
rtctk::componentFramework::LogInitializer::LogInitializer
LogInitializer()
Definition: logger.cpp:44
rtctk::componentFramework::LogInitializer
RAII class to clean-up logging without leaking memory.
Definition: logger.hpp:23
rtctk::componentFramework::GetLogger
log4cplus::Logger & GetLogger(const std::string &name="")
Get handle to a specific logger (used with logging macros)
rtctk::componentFramework::LogInitializer::~LogInitializer
~LogInitializer()
Definition: logger.cpp:58
rtctk::componentFramework::SetDefaultLogger
void SetDefaultLogger(const std::string &name)
Set the default logger.
Definition: logger.cpp:62