better logging with TRACE, DEBUG, and FATAL #160
@ -14,11 +14,14 @@
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/log/utility/setup.hpp>
|
||||
|
||||
#define TRACE BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::trace)
|
||||
#define DEBUG BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::debug)
|
||||
#define INFO BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::info)
|
||||
#define WARN BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::warning)
|
||||
#define ERROR BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::error)
|
||||
#define FATAL BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::fatal)
|
||||
|
||||
#define SYS_LOGFILE "/var/log/example.log"
|
||||
#define SYS_LOGFILE "/var/log/example.log"
|
||||
|
||||
//Narrow-char thread-safe logger.
|
||||
typedef boost::log::sources::severity_logger_mt<boost::log::trivial::severity_level> logger_t;
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "logger.hpp"
|
||||
|
||||
namespace attrs = boost::log::attributes;
|
||||
//namespace attrs = boost::log::attributes;
|
||||
namespace expr = boost::log::expressions;
|
||||
namespace logging = boost::log;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user