Opened 7 years ago

Last modified 7 years ago

#11371 new Bugs

Logging: Advanced event log backend, Blank replaceable parameters

Reported by: Eusebio Rufian-Zilbermann <eusebio@…> Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Overview: I'm trying to use Boost Logging for sending events to the Windows event log. In the event log the replaceable parameters are showing up as empty strings, E.g., for a message of "Operation finished successfully in %1 seconds." the event log will simply show "Operation finished successfully in seconds." and the value for %1 is lost (instead of replaced into the string).

Code: I reproduced this problem on the example provided in the boost distribution itself (libs\log\example\event_log), after commenting out the custom event mapping section, to work around the issue described in ticket 9292, https://svn.boost.org/trac/boost/ticket/9292

=======Event mapping section to be commented out======

sinks::event_log::custom_event_type_mapping< severity_level > type_mapping("Severity"); type_mapping[normal] = sinks::event_log::make_event_type(MY_SEVERITY_INFO); type_mapping[warning] = sinks::event_log::make_event_type(MY_SEVERITY_WARNING); type_mapping[error] = sinks::event_log::make_event_type(MY_SEVERITY_ERROR); backend->set_event_type_mapper(type_mapping);

=======End of event mapping section to be commented out======

Environment: Windows Server 2008R2 (6.1.7601) with compilers from the Windows SDK 7.0

cl.exe version 15.00.30729.01 (VC9), target processor x64. Message compiler mc.exe version 1.12.7600.

Change History (1)

comment:1 by Eusebio Rufian-Zilbermann <eusebio@…>, 7 years ago

Submitted duplicate due to a web browser issue. This is the same as #11372

Note: See TracTickets for help on using tickets.