Boost logo

Boost :

Subject: Re: [boost] Boost log issues and workarounds
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2019-01-18 10:16:23


On 1/18/19 12:41 PM, hh h wrote:
>> If you want a severity level attribute, that should be severity_channel_logger_mt< ServerityLevel_t >
>
> I added ServerityLevel_t to the severity_channel_logger_mt, but still
> couldn't printed out the severity, otherwise, seems everything works.

If you're using boost::log::trivial::severity keyword in the formatter
then that is the problem. This keyword corresponds to the
boost::log::trivial::severity_level enum for severity levels. For custom
enums, custom keywords should be defined and used.

https://www.boost.org/doc/libs/1_69_0/libs/log/doc/html/log/detailed/expressions.html#log.detailed.expressions.attr_keywords

Also, please don't top-post. Our discussion guidelines are described here:

https://www.boost.org/community/policy.html


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk