17 Jul
2014
17 Jul
'14
6:38 p.m.
Am 21.03.2014 15:00, schrieb Olivier Tournaire:
I am trying to extract severity level from a log record, but i seems that I am doing it the wrong way. Here is the code I use:
void LogDockWidget::receiveLog(boost::log::record_view const& rec, const std::string& log) { logging::value_ref< logging::trivial::severity_level > level = logging::extract< logging::trivial::severity_level >("Severity", rec); // ... }
Here level.get() always returns "info". All my logs are done with the BOOST_LOG_TRIVIAL(...) macro. The formatter whereas displays correctly the severity level. Here is how it is defined:
I run into the similar/same problem. Did you solve it? Thanks, Olaf