LS,
I am currently configuring my logging configuration using a property tree. When I include a SimpleEventLog sink, how can I apply an event type mapping to that sink?
In the stated example this is done before the sink is added to the core:
typedef sinks::synchronous_sink< sinks::simple_event_log_backend > sink_t;
boost::shared_ptr< sink_t > sink(new sink_t());
sinks::event_log::custom_event_type_mapping< severity_level > mapping("Severity");
// … define mapping here …
sink->locked_backend()->set_event_type_mapper(mapping);
// Add the sink to the core
logging::core::get()->add_sink(sink);
but adding the sink happens behind the scenes when using the configuration utilities.
BTW, in the section “Simplified library initialization tools” of the documentation Table 1.15 seems to miss a ‘Format’ parameter that I assume is still needed?
Many thanks,
Pieter