RTC Toolkit 4.0.1
Loading...
Searching...
No Matches
logger.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_LOGGER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_LOGGER_HPP
15
16#include <log4cplus/initializer.h>
17#include <log4cplus/logger.h>
18#include <log4cplus/loggingmacros.h>
19
21
29public:
30 LogInitializer() = default;
31
32private:
33 log4cplus::Initializer m_initializer;
34};
35
50void LogConfigure(const std::string& app_name, const std::string& props_file_name);
51
69void LogConfigure(const std::string& app_name,
70 log4cplus::LogLevel default_log_level = log4cplus::INFO_LOG_LEVEL);
71
89void LogConfigureTool(const std::string& app_name,
90 log4cplus::LogLevel default_log_level = log4cplus::ERROR_LOG_LEVEL,
91 bool log_to_file = false);
92
114log4cplus::Logger& GetLogger(const std::string& name = "app");
115
116} // namespace rtctk::componentFramework
117
118#endif // RTCTK_COMPONENTFRAMEWORK_LOGGER_HPP
RAII class to clean-up logging without leaking memory.
Definition: logger.hpp:28
log4cplus::Logger & GetLogger(const std::string &name="app")
Get handle to a specific logger.
Definition: logger.cpp:180
void LogConfigureTool(const std::string &app_name, log4cplus::LogLevel default_log_level=log4cplus::ERROR_LOG_LEVEL, bool log_to_file=false)
Performs default logging configuration for Client Applications and Standalone Tools.
Definition: logger.cpp:133
void LogConfigure(const std::string &app_name, const std::string &props_file_name)
Performs custom logging configuration for any application.
Definition: logger.cpp:69
Definition: commandReplier.cpp:22