10 #pragma clang diagnostic push
11 #pragma clang diagnostic ignored "-Wunused-variable"
14 #include <log4cplus/logger.h>
15 #include <log4cplus/loggingmacros.h>
16 #include <log4cplus/initializer.h>
19 #pragma clang diagnostic pop
23 #pragma clang diagnostic push
24 #pragma clang diagnostic ignored "-Wmismatched-tags"
27 #include <boost/units/detail/utility.hpp>
30 #pragma clang diagnostic pop
33 #define TYPE_NAME(_type) boost::units::detail::demangle(typeid(_type).name())
35 #define LOG(_Level, _Msg) \
37 if (LoggingDisabled()) break; \
38 log4cplus::Logger logger = log4cplus::Logger::getRoot(); \
39 LOG4CPLUS_##_Level(logger, _Msg); \
67 void Init(
const std::string &filename,
71 const std::string &syslogFacility,
72 const std::string &ident,
73 log4cplus::LogLevel logLevel);
77 void Init(
const std::string &propertyFile);
85 const std::string &syslogFacility,
86 const std::string &ident,
87 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)