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,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"

View File

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