
On 03/15/2010 11:36 PM, Steven Watanabe wrote:
AMDG
Andrey Semashev wrote:
On 03/15/2010 10:50 PM, Steven Watanabe wrote:
I guess that what I'd like is a way to specify arbitrary attributes when logging, so BOOST_LOG_XXX would be defined like
#define BOOST_LOG_XXX(lg, component, severity) BOOST_LOG_WITH_ATTRS(lg, ("Severity", severity)("Channel", component))
That should be quite possible, if there was some way to select the attributes from the rest of the named parameters for the logger. Although that would mean the attributes are added/removed from the logger at each record.
You might be able to create special keywords that are associated with attribute names.
I think, it should be a single keyword that accumulates all attributes to be added. It's just how to store them in the named argument. In a fusion::vector, perhaps?..