better logging with TRACE, DEBUG, and FATAL #160

Merged
AlexVdberg merged 2 commits from dev-logger into master 2021-03-15 16:37:01 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 4f5c4645ac - Show all commits

View File

@ -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;

View File

@ -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;