Subject: [Boost-bugs] [Boost C++ Libraries] #10246: asynchronous_sink sometimes "misses" an attribute
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-26 13:04:57
#10246: asynchronous_sink sometimes "misses" an attribute
------------------------------+---------------------
Reporter: bielecki.b@⦠| Owner: andysem
Type: Bugs | Status: new
Milestone: To Be Determined | Component: log
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
------------------------------+---------------------
Using following
{{{
boost::log::sinks::asynchronous_sink<
boost::log::sinks::text_ostream_backend
>
boost::log::sources::severity_channel_logger_mt<Level, Group> scl;
}}}
with helper keywords (Level and Group and enums)
{{{
namespace {
BOOST_LOG_ATTRIBUTE_KEYWORD(level, "Severity", Level)
BOOST_LOG_ATTRIBUTE_KEYWORD(group, "Channel", Group)
}
}}}
configured to use following format
{{{
void formatter(
blog::record_view const& record,
blog::formatting_ostream& stream
) {
stream << "[" << record[level] << "]";
stream << "[" << record[group] << "]";
stream << " " << record[expr::smessage];
}
}}}
In the std::cout and/or in file output one of the attributes (I only
noticed this happens for level) is (sometimes) missing, even though that
they are always passed. Example:
{{{
BOOST_LOG_CHANNEL_SEV(scl, Group::General, Level::Error) << "Foo";
}}}
Possible outputs:[[BR]]
[Error][General] Foo[[BR]]
[][General] Foo
This doesn't happen in case of synchronous sink.
Visual Studio 2013
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10246> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC