Boost logo

Boost Users :

Subject: Re: [Boost-users] [Log] Extract severity value
From: Olaf Peter (ope-devel_at_[hidden])
Date: 2014-07-17 14:38:33


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net