Subject: Re: [boost] boost log: attributes and different loggers
From: Dirk Griffioen (dirk.griffioen_at_[hidden])
Date: 2010-06-11 05:16:37
Thanks for your reply!
> If you emit log records from the basic logger (not the one with severity
> level), the record doesn't contain the severity level attached. The
> filter throws because it doesn't find it in the record.
> You can change the filter in two ways to avoid the exception:
> 1. flt::attr< severity_level>("Severity", std::nothrow)>= level
This works fine for me.
> That way the filter will silently drop all records without the level
> 2. !flt::has_attr< severity_level>("Severity") ||
> flt::attr< severity_level>("Severity")>= level
> That way it will pass all records without the level.
I tried something in this direction, but didnt get it quite right before.
Thanks for clarifying -