better logging with TRACE, DEBUG, and FATAL #160
@ -14,9 +14,12 @@
|
|||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
#include <boost/log/utility/setup.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 INFO BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::info)
|
||||||
#define WARN BOOST_LOG_SEV(my_logger::get(), boost::log::trivial::warning)
|
#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 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"
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "logger.hpp"
|
#include "logger.hpp"
|
||||||
|
|
||||||
namespace attrs = boost::log::attributes;
|
//namespace attrs = boost::log::attributes;
|
||||||
namespace expr = boost::log::expressions;
|
namespace expr = boost::log::expressions;
|
||||||
namespace logging = boost::log;
|
namespace logging = boost::log;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user