RTC Toolkit  2.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 
40 void LogConfigure(const std::string& cfg_file_name = "");
41 
51 void MakeLogger(const std::string& name,
52  log4cplus::LogLevel ll,
53  bool log_to_file = true,
54  bool additive = false,
55  log4cplus::LogLevel log_to_console_threshold = log4cplus::NOT_SET_LOG_LEVEL);
56 
64 // Define which logger is retrieved when calling GetLogger() with any args
65 void SetDefaultLogger(const std::string& name);
66 
76 log4cplus::Logger& GetLogger(const std::string& name = "");
77 
78 } // namespace rtctk::componentFramework
79 
80 #endif
wscript.name
name
Definition: wscript:15
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:48
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:62
rtctk::componentFramework::MakeLogger
void MakeLogger(const std::string &name, log4cplus::LogLevel ll, bool log_to_file=true, bool additive=false, log4cplus::LogLevel log_to_console_threshold=log4cplus::NOT_SET_LOG_LEVEL)
Retrieve new logger programmatically.
rtctk::componentFramework::SetDefaultLogger
void SetDefaultLogger(const std::string &name)
Set the default logger.
Definition: logger.cpp:66