Boost logo

Boost Users :

From: Bill Somerville (bill_at_[hidden])
Date: 2020-09-18 19:48:19


Hi all,

I am experimenting with using multiple channels with Boost.Log. I am
using the boost::trivial severity levels, the common attributes, and
logging using BOOST_LOG_SEV() using a mix of global and class specific
loggers. I am also using boost::log::init_from_stream(std::istream&) to
configure sinks from a settings file. I would like to be able to define
a sink filter that allows increasing the logging verbosity on just one
channel but I am struggling to write succinct filer expressions. E.g
given three channels A, B, and C I would like to write:

Filter="(%Channel% = \"B\" and %Severity% >= trace) or %Severity% >=
warning"

to increase the verbosity to trace only on channel B, but this doesn't
work. I am finding I have to write:

Filter="(%Channel% = \"B\" and %Severity% >= trace) or (%Channel% !=
\"B\" and %Severity% >= warning)"

Is this expected behaviour? If so then declaring more complex filtering
will become burdensome.

Regards
Bill Somerville.


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