9 #pragma clang diagnostic push
10 #pragma clang diagnostic ignored "-Wunused-variable"
13 #include <log4cplus/logger.h>
14 #include <log4cplus/loggingmacros.h>
15 #include <log4cplus/initializer.h>
18 #pragma clang diagnostic pop
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wmismatched-tags"
26 #include <boost/units/detail/utility.hpp>
29 #pragma clang diagnostic pop
32 #define TYPE_NAME(_type) boost::units::detail::demangle(typeid(_type).name())
34 #define LOG(_Level, _Msg) \
36 if (LoggingDisabled()) break; \
37 log4cplus::Logger logger = log4cplus::Logger::getRoot(); \
38 LOG4CPLUS_##_Level(logger, _Msg); \
66 void Init(
const std::string &filename,
70 const std::string &syslogFacility,
71 const std::string &ident,
72 log4cplus::LogLevel logLevel);
76 void Init(
const std::string &propertyFile);
84 const std::string &syslogFacility,
85 const std::string &ident,
86 log4cplus::LogLevel logLevel);
A class providing basic control over logging capabilities in OpenSDN control plane.
void Init()
Performs basic initialization of the logging system ( log4cplus).
log4cplus::Initializer initializer_
A log4cplus object to maintain multi- and singlethreaded execution of the logging library.
Logging()
Prepares log4cplus library for execution. Uses RAII to free resources after the completion of the pro...
~Logging()
Destroys the object and shutdowns the logging system.
void SetLoggingLevel(log4cplus::LogLevel logLevel)
void SetLoggingDisabled(bool flag)