Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:25

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   event_log_backend.hpp
0009  * \author Andrey Semashev
0010  * \date   07.11.2008
0011  *
0012  * The header contains a logging sink backend that uses Windows NT event log API
0013  * for signaling application events.
0014  */
0015 
0016 #ifndef BOOST_LOG_SINKS_EVENT_LOG_BACKEND_HPP_INCLUDED_
0017 #define BOOST_LOG_SINKS_EVENT_LOG_BACKEND_HPP_INCLUDED_
0018 
0019 #include <boost/log/detail/config.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 #ifndef BOOST_LOG_WITHOUT_EVENT_LOG
0026 
0027 #include <map>
0028 #include <vector>
0029 #include <string>
0030 #include <iosfwd>
0031 #include <boost/filesystem/path.hpp>
0032 #include <boost/log/detail/light_function.hpp>
0033 #include <boost/log/detail/parameter_tools.hpp>
0034 #include <boost/log/attributes/attribute_value_set.hpp>
0035 #include <boost/log/keywords/message_file.hpp>
0036 #include <boost/log/keywords/log_name.hpp>
0037 #include <boost/log/keywords/log_source.hpp>
0038 #include <boost/log/keywords/registration.hpp>
0039 #include <boost/log/keywords/target.hpp>
0040 #include <boost/log/sinks/basic_sink_backend.hpp>
0041 #include <boost/log/sinks/frontend_requirements.hpp>
0042 #include <boost/log/sinks/attribute_mapping.hpp>
0043 #include <boost/log/sinks/event_log_constants.hpp>
0044 #include <boost/log/core/record_view.hpp>
0045 #include <boost/log/expressions/formatter.hpp>
0046 #include <boost/log/detail/header.hpp>
0047 
0048 namespace boost {
0049 
0050 BOOST_LOG_OPEN_NAMESPACE
0051 
0052 namespace sinks {
0053 
0054 namespace event_log {
0055 
0056     //! Event log source registration modes
0057     enum registration_mode
0058     {
0059         never,      //!< Never register event source, even if it's not registered
0060         on_demand,  //!< Register if the source is not registered yet
0061         forced      //!< Register always, event if the source is already registered
0062     };
0063 
0064     /*!
0065      * \brief Straightforward event type mapping
0066      *
0067      * This type of mapping assumes that attribute with a particular name always
0068      * provides values that map directly onto the native event types. The mapping
0069      * simply returns the extracted attribute value converted to the native event type.
0070      */
0071     template< typename AttributeValueT = int >
0072     class direct_event_type_mapping :
0073         public basic_direct_mapping< event_type, AttributeValueT >
0074     {
0075         //! Base type
0076         typedef basic_direct_mapping< event_type, AttributeValueT > base_type;
0077 
0078     public:
0079         /*!
0080          * Constructor
0081          *
0082          * \param name Attribute name
0083          */
0084         explicit direct_event_type_mapping(attribute_name const& name) :
0085             base_type(name, info)
0086         {
0087         }
0088     };
0089 
0090     /*!
0091      * \brief Customizable event type mapping
0092      *
0093      * The class allows to setup a custom mapping between an attribute and native event types.
0094      * The mapping should be initialized similarly to the standard \c map container, by using
0095      * indexing operator and assignment.
0096      */
0097     template< typename AttributeValueT = int >
0098     class custom_event_type_mapping :
0099         public basic_custom_mapping< event_type, AttributeValueT >
0100     {
0101         //! Base type
0102         typedef basic_custom_mapping< event_type, AttributeValueT > base_type;
0103 
0104     public:
0105         /*!
0106          * Constructor
0107          *
0108          * \param name Attribute name
0109          */
0110         explicit custom_event_type_mapping(attribute_name const& name) :
0111             base_type(name, info)
0112         {
0113         }
0114     };
0115 
0116     /*!
0117      * \brief Straightforward event ID mapping
0118      *
0119      * This type of mapping assumes that attribute with a particular name always
0120      * provides values that map directly onto the event identifiers. The mapping
0121      * simply returns the extracted attribute value converted to the event ID.
0122      */
0123     template< typename AttributeValueT = int >
0124     class direct_event_id_mapping :
0125         public basic_direct_mapping< event_id, AttributeValueT >
0126     {
0127         //! Base type
0128         typedef basic_direct_mapping< event_id, AttributeValueT > base_type;
0129 
0130     public:
0131         /*!
0132          * Constructor
0133          *
0134          * \param name Attribute name
0135          */
0136         explicit direct_event_id_mapping(attribute_name const& name) :
0137             base_type(name, make_event_id(0))
0138         {
0139         }
0140     };
0141 
0142     /*!
0143      * \brief Customizable event ID mapping
0144      *
0145      * The class allows to setup a custom mapping between an attribute and event identifiers.
0146      * The mapping should be initialized similarly to the standard \c map container, by using
0147      * indexing operator and assignment.
0148      */
0149     template< typename AttributeValueT = int >
0150     class custom_event_id_mapping :
0151         public basic_custom_mapping< event_id, AttributeValueT >
0152     {
0153         //! Base type
0154         typedef basic_custom_mapping< event_id, AttributeValueT > base_type;
0155 
0156     public:
0157         /*!
0158          * Constructor
0159          *
0160          * \param name Attribute name
0161          */
0162         explicit custom_event_id_mapping(attribute_name const& name) :
0163             base_type(name, make_event_id(0))
0164         {
0165         }
0166     };
0167 
0168     /*!
0169      * \brief Straightforward event category mapping
0170      *
0171      * This type of mapping assumes that attribute with a particular name always
0172      * provides values that map directly onto the event categories. The mapping
0173      * simply returns the extracted attribute value converted to the event category.
0174      */
0175     template< typename AttributeValueT = int >
0176     class direct_event_category_mapping :
0177         public basic_direct_mapping< event_category, AttributeValueT >
0178     {
0179         //! Base type
0180         typedef basic_direct_mapping< event_category, AttributeValueT > base_type;
0181 
0182     public:
0183         /*!
0184          * Constructor
0185          *
0186          * \param name Attribute name
0187          */
0188         explicit direct_event_category_mapping(attribute_name const& name) :
0189             base_type(name, make_event_category(0))
0190         {
0191         }
0192     };
0193 
0194     /*!
0195      * \brief Customizable event category mapping
0196      *
0197      * The class allows to setup a custom mapping between an attribute and event categories.
0198      * The mapping should be initialized similarly to the standard \c map container, by using
0199      * indexing operator and assignment.
0200      */
0201     template< typename AttributeValueT = int >
0202     class custom_event_category_mapping :
0203         public basic_custom_mapping< event_category, AttributeValueT >
0204     {
0205         //! Base type
0206         typedef basic_custom_mapping< event_category, AttributeValueT > base_type;
0207 
0208     public:
0209         /*!
0210          * Constructor
0211          *
0212          * \param name Attribute name
0213          */
0214         explicit custom_event_category_mapping(attribute_name const& name) :
0215             base_type(name, make_event_category(0))
0216         {
0217         }
0218     };
0219 
0220     /*!
0221      * \brief An event composer
0222      *
0223      * This class is a function object that extracts event identifier from the attribute values set
0224      * and formats insertion strings for the particular event. Each insertion string is formatted with
0225      * a distinct formatter, which can be created just like regular sinks formatters.
0226      *
0227      * Before using, the composer must be initialized with the following information:
0228      * \li Event identifier extraction logic. One can use \c basic_direct_event_id_mapping or
0229      *     \c basic_custom_event_id_mapping classes in order to create such extractor and pass it
0230      *     to the composer constructor.
0231      * \li Event identifiers and insertion string formatters. The composer provides the following
0232      *     syntax to provide this information:
0233      *
0234      *     \code
0235      *     event_composer comp;
0236      *     comp[MY_EVENT_ID1] % formatter1 % ... % formatterN;
0237      *     comp[MY_EVENT_ID2] % formatter1 % ... % formatterN;
0238      *     ...
0239      *     \endcode
0240      *
0241      *     The event identifiers in square brackets are provided by the message compiler generated
0242      *     header (the actual names are specified in the .mc file). The formatters represent
0243      *     the insertion strings that will be used to replace placeholders in event messages,
0244      *     thus the number and the order of the formatters must correspond to the message definition.
0245      */
0246     template< typename CharT >
0247     class BOOST_LOG_API basic_event_composer
0248     {
0249     public:
0250         //! Character type
0251         typedef CharT char_type;
0252         //! String type to be used as a message text holder
0253         typedef std::basic_string< char_type > string_type;
0254 
0255         //! Event identifier mapper type
0256         typedef boost::log::aux::light_function< event_id (record_view const&) > event_id_mapper_type;
0257 
0258         //! Type of an insertion composer (a formatter)
0259         typedef basic_formatter< char_type > formatter_type;
0260         //! Type of the composed insertions list
0261         typedef std::vector< string_type > insertion_list;
0262 
0263     private:
0264         //! \cond
0265 
0266         //! The class that implements formatting of insertion strings
0267         class insertion_composer;
0268 
0269         //! Type of the events map
0270         typedef std::map< event_id, insertion_composer > event_map;
0271 
0272         //! A smart reference that puts formatters into the composer
0273         class event_map_reference;
0274         friend class event_map_reference;
0275         class event_map_reference
0276         {
0277         private:
0278             //! Event identifier
0279             event_id m_ID;
0280             //! A reference to the object that created the reference
0281             basic_event_composer< char_type >& m_Owner;
0282             //! A hint for the owner to optimize insertion
0283             insertion_composer* m_Composer;
0284 
0285         public:
0286             //! Initializing constructor
0287             explicit event_map_reference(event_id id, basic_event_composer< char_type >& owner) :
0288                 m_ID(id),
0289                 m_Owner(owner),
0290                 m_Composer(0)
0291             {
0292             }
0293             //! The operator puts the formatter into the composer
0294             template< typename FormatterT >
0295             event_map_reference& operator% (FormatterT const& fmt)
0296             {
0297                 m_Composer = m_Owner.add_formatter(m_ID, m_Composer, formatter_type(fmt));
0298                 return *this;
0299             }
0300         };
0301 
0302         //! \endcond
0303 
0304     private:
0305         //! The mapper that will extract the event identifier
0306         event_id_mapper_type m_EventIDMapper;
0307         //! The map of event identifiers and their insertion composers
0308         event_map m_EventMap;
0309 
0310     public:
0311         /*!
0312          * Default constructor. Creates an empty map of events.
0313          *
0314          * \param id_mapper An event identifier mapping function that will be used to extract event ID from attribute values
0315          */
0316         explicit basic_event_composer(event_id_mapper_type const& id_mapper);
0317         /*!
0318          * Copy constructor. Performs a deep copy of the object.
0319          */
0320         basic_event_composer(basic_event_composer const& that);
0321         /*!
0322          * Destructor
0323          */
0324         ~basic_event_composer();
0325 
0326         /*!
0327          * Assignment. Provides strong exception guarantee.
0328          */
0329         basic_event_composer& operator= (basic_event_composer that);
0330         /*!
0331          * Swaps \c *this and \c that objects.
0332          */
0333         void swap(basic_event_composer& that);
0334         /*!
0335          * Initiates creation of a new event description. The result of the operator can be used to
0336          * add formatters for insertion strings construction. The returned reference type is implementation detail.
0337          *
0338          * \param id Event identifier.
0339          */
0340         event_map_reference operator[] (event_id id);
0341         /*!
0342          * Initiates creation of a new event description. The result of the operator can be used to
0343          * add formatters for insertion strings construction. The returned reference type is implementation detail.
0344          *
0345          * \param id Event identifier.
0346          */
0347         event_map_reference operator[] (int id);
0348         /*!
0349          * Event composition operator. Extracts an event identifier from the attribute values by calling event ID mapper.
0350          * Then runs all formatters that were registered for the event with the extracted ID. The results of formatting
0351          * are returned in the \a insertions parameter.
0352          *
0353          * \param rec Log record view
0354          * \param insertions A sequence of formatted insertion strings
0355          * \return An event identifier that was extracted from \c attributes
0356          */
0357         event_id operator() (record_view const& rec, insertion_list& insertions) const;
0358 
0359     private:
0360 #ifndef BOOST_LOG_DOXYGEN_PASS
0361         //! Adds a formatter to the insertion composers list
0362         insertion_composer* add_formatter(event_id id, insertion_composer* composer, formatter_type const& fmt);
0363 #endif // BOOST_LOG_DOXYGEN_PASS
0364     };
0365 
0366 #ifdef BOOST_LOG_USE_CHAR
0367     typedef basic_event_composer< char > event_composer;          //!< Convenience typedef for narrow-character logging
0368 #endif
0369 #ifdef BOOST_LOG_USE_WCHAR_T
0370     typedef basic_event_composer< wchar_t > wevent_composer;      //!< Convenience typedef for wide-character logging
0371 #endif
0372 
0373 } // namespace event_log
0374 
0375 /*!
0376  * \brief An implementation of a simple logging sink backend that emits events into Windows NT event log
0377  *
0378  * The sink uses Windows NT 5 (Windows 2000) and later event log API to emit events
0379  * to an event log. The sink acts as an event source in terms of the API, it implements all needed resources
0380  * and source registration in the Windows registry that is needed for the event delivery.
0381  *
0382  * The backend performs message text formatting. The composed text is then passed as the first
0383  * and only string parameter of the event. The resource embedded into the backend describes the event
0384  * so that the parameter is inserted into the event description text, thus making it visible
0385  * in the event log.
0386  *
0387  * The backend allows to customize mapping of application severity levels to the native Windows event types.
0388  * This allows to write portable code even if OS-specific sinks, such as this one, are used.
0389  *
0390  * \note Since the backend registers itself into Windows registry as the resource file that contains
0391  *       event description, it is important to keep the library binary in a stable place of the filesystem.
0392  *       Otherwise Windows might not be able to load event resources from the library and display
0393  *       events correctly.
0394  *
0395  * \note It is known that Windows is not able to find event resources in the application executable,
0396  *       which is linked against the static build of the library. Users are advised to use dynamic
0397  *       builds of the library to solve this problem.
0398  */
0399 template< typename CharT >
0400 class basic_simple_event_log_backend :
0401     public basic_formatted_sink_backend< CharT, concurrent_feeding >
0402 {
0403     //! Base type
0404     typedef basic_formatted_sink_backend< CharT, concurrent_feeding > base_type;
0405     //! Implementation type
0406     struct implementation;
0407 
0408 public:
0409     //! Character type
0410     typedef typename base_type::char_type char_type;
0411     //! String type to be used as a message text holder
0412     typedef typename base_type::string_type string_type;
0413 
0414     //! Mapper type for the event type
0415     typedef boost::log::aux::light_function< event_log::event_type (record_view const&) > event_type_mapper_type;
0416 
0417 private:
0418     //! Pointer to the backend implementation that hides various types from windows.h
0419     implementation* m_pImpl;
0420 
0421 public:
0422     /*!
0423      * Default constructor. Registers event source with name based on the application
0424      * executable file name in the Application log. If such a registration is already
0425      * present, it is not overridden.
0426      */
0427     BOOST_LOG_API basic_simple_event_log_backend();
0428     /*!
0429      * Constructor. Registers event log source with the specified parameters.
0430      * The following named parameters are supported:
0431      *
0432      * \li \c target - Specifies an UNC path to the remote server which log records should be sent to.
0433      *     The local machine will be used to process log records, if not specified.
0434      * \li \c log_name - Specifies the log in which the source should be registered.
0435      *     The result of \c get_default_log_name is used, if the parameter is not specified.
0436      * \li \c log_source - Specifies the source name. The result of \c get_default_source_name
0437      *     is used, if the parameter is not specified.
0438      * \li \c registration - Specifies the event source registration mode in the Windows registry.
0439      *     Can have values of the \c registration_mode enum. Default value: \c on_demand.
0440      *
0441      * \param args A set of named parameters.
0442      */
0443 #ifndef BOOST_LOG_DOXYGEN_PASS
0444     BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_CALL(basic_simple_event_log_backend, construct)
0445 #else
0446     template< typename... ArgsT >
0447     explicit basic_simple_event_log_backend(ArgsT... const& args);
0448 #endif
0449 
0450     /*!
0451      * Destructor. Unregisters event source. The log source description is not removed from the Windows registry.
0452      */
0453     BOOST_LOG_API ~basic_simple_event_log_backend();
0454 
0455     /*!
0456      * The method installs the function object that maps application severity levels to WinAPI event types
0457      */
0458     BOOST_LOG_API void set_event_type_mapper(event_type_mapper_type const& mapper);
0459 
0460     /*!
0461      * \returns Default log name: Application
0462      */
0463     BOOST_LOG_API static string_type get_default_log_name();
0464     /*!
0465      * \returns Default log source name that is based on the application executable file name and the sink name
0466      */
0467     BOOST_LOG_API static string_type get_default_source_name();
0468 
0469     /*!
0470      * The method puts the formatted message to the event log
0471      */
0472     BOOST_LOG_API void consume(record_view const& rec, string_type const& formatted_message);
0473 
0474 private:
0475 #ifndef BOOST_LOG_DOXYGEN_PASS
0476     //! Constructs backend implementation
0477     template< typename ArgsT >
0478     void construct(ArgsT const& args)
0479     {
0480         construct(
0481             args[keywords::target | string_type()],
0482             args[keywords::log_name || &basic_simple_event_log_backend::get_default_log_name],
0483             args[keywords::log_source || &basic_simple_event_log_backend::get_default_source_name],
0484             args[keywords::registration | event_log::on_demand]);
0485     }
0486     BOOST_LOG_API void construct(
0487         string_type const& target,
0488         string_type const& log_name,
0489         string_type const& source_name,
0490         event_log::registration_mode reg_mode);
0491 #endif // BOOST_LOG_DOXYGEN_PASS
0492 };
0493 
0494 /*!
0495  * \brief An implementation of a logging sink backend that emits events into Windows NT event log
0496  *
0497  * The sink uses Windows NT 5 (Windows 2000) and later event log API to emit events
0498  * to an event log. The sink acts as an event source. Unlike \c basic_simple_event_log_backend,
0499  * this sink backend allows users to specify the custom event message file and supports
0500  * mapping attribute values onto several insertion strings. Although it requires considerably
0501  * more scaffolding than the simple backend, this allows to support localizable event descriptions.
0502  *
0503  * Besides the file name of the module with event resources, the backend provides the following
0504  * customizations:
0505  * \li Remote server UNC address, log name and source name. These parameters have similar meaning
0506  *     to \c basic_simple_event_log_backend.
0507  * \li Event type and category mappings. These are function object that allow to map attribute
0508  *     values to the according event parameters. One can use mappings in the \c event_log namespace.
0509  * \li Event composer. This function object extracts event identifier and formats string insertions,
0510  *     that will be used by the API to compose the final event message text.
0511  */
0512 template< typename CharT >
0513 class basic_event_log_backend :
0514     public basic_sink_backend< synchronized_feeding >
0515 {
0516     //! Base type
0517     typedef basic_sink_backend< synchronized_feeding > base_type;
0518     //! Implementation type
0519     struct implementation;
0520 
0521 public:
0522     //! Character type
0523     typedef CharT char_type;
0524     //! String type
0525     typedef std::basic_string< char_type > string_type;
0526     //! Type of the composed insertions list
0527     typedef std::vector< string_type > insertion_list;
0528 
0529     //! Mapper type for the event type
0530     typedef boost::log::aux::light_function< event_log::event_type (record_view const&) > event_type_mapper_type;
0531     //! Mapper type for the event category
0532     typedef boost::log::aux::light_function< event_log::event_category (record_view const&) > event_category_mapper_type;
0533     //! Event composer type
0534     typedef boost::log::aux::light_function< event_log::event_id (record_view const&, insertion_list&) > event_composer_type;
0535 
0536 private:
0537     //! Pointer to the backend implementation that hides various types from windows.h
0538     implementation* m_pImpl;
0539 
0540 public:
0541     /*!
0542      * Constructor. Registers event source with name based on the application
0543      * executable file name in the Application log. If such a registration is already
0544      * present, it is not overridden.
0545      */
0546     template< typename T >
0547     explicit basic_event_log_backend(std::basic_string< T > const& message_file_name)
0548     {
0549         construct(keywords::message_file = message_file_name);
0550     }
0551     /*!
0552      * Constructor. Registers event source with name based on the application
0553      * executable file name in the Application log. If such a registration is already
0554      * present, it is not overridden.
0555      */
0556     explicit basic_event_log_backend(filesystem::path const& message_file_name)
0557     {
0558         construct(keywords::message_file = message_file_name);
0559     }
0560     /*!
0561      * Constructor. Registers event log source with the specified parameters.
0562      * The following named parameters are supported:
0563      *
0564      * \li \c message_file - Specifies the file name that contains resources that
0565      *     describe events and categories. This parameter is mandatory unless \c registration is \c never.
0566      * \li \c target - Specifies an UNC path to the remote server to which log records should be sent to.
0567      *     The local machine will be used to process log records, if not specified.
0568      * \li \c log_name - Specifies the log in which the source should be registered.
0569      *     The result of \c get_default_log_name is used, if the parameter is not specified.
0570      * \li \c log_source - Specifies the source name. The result of \c get_default_source_name
0571      *     is used, if the parameter is not specified.
0572      * \li \c registration - Specifies the event source registration mode in the Windows registry.
0573      *     Can have values of the \c registration_mode enum. Default value: \c on_demand.
0574      *
0575      * \param args A set of named parameters.
0576      */
0577 #ifndef BOOST_LOG_DOXYGEN_PASS
0578     BOOST_LOG_PARAMETRIZED_CONSTRUCTORS_CALL(basic_event_log_backend, construct)
0579 #else
0580     template< typename... ArgsT >
0581     explicit basic_event_log_backend(ArgsT... const& args);
0582 #endif
0583 
0584     /*!
0585      * Destructor. Unregisters event source. The log source description is not removed from the Windows registry.
0586      */
0587     BOOST_LOG_API ~basic_event_log_backend();
0588 
0589     /*!
0590      * The method creates an event in the event log
0591      *
0592      * \param rec Log record to consume
0593      */
0594     BOOST_LOG_API void consume(record_view const& rec);
0595 
0596     /*!
0597      * The method installs the function object that maps application severity levels to WinAPI event types
0598      */
0599     BOOST_LOG_API void set_event_type_mapper(event_type_mapper_type const& mapper);
0600 
0601     /*!
0602      * The method installs the function object that extracts event category from attribute values
0603      */
0604     BOOST_LOG_API void set_event_category_mapper(event_category_mapper_type const& mapper);
0605 
0606     /*!
0607      * The method installs the function object that extracts event identifier from the attributes and creates
0608      * insertion strings that will replace placeholders in the event message.
0609      */
0610     BOOST_LOG_API void set_event_composer(event_composer_type const& composer);
0611 
0612     /*!
0613      * \returns Default log name: Application
0614      */
0615     BOOST_LOG_API static string_type get_default_log_name();
0616     /*!
0617      * \returns Default log source name that is based on the application executable file name and the sink name
0618      */
0619     BOOST_LOG_API static string_type get_default_source_name();
0620 
0621 private:
0622 #ifndef BOOST_LOG_DOXYGEN_PASS
0623     //! Constructs backend implementation
0624     template< typename ArgsT >
0625     void construct(ArgsT const& args)
0626     {
0627         construct(
0628             filesystem::path(args[keywords::message_file | filesystem::path()]),
0629             args[keywords::target | string_type()],
0630             args[keywords::log_name || &basic_event_log_backend::get_default_log_name],
0631             args[keywords::log_source || &basic_event_log_backend::get_default_source_name],
0632             args[keywords::registration | event_log::on_demand]);
0633     }
0634     BOOST_LOG_API void construct(
0635         filesystem::path const& message_file_name,
0636         string_type const& target,
0637         string_type const& log_name,
0638         string_type const& source_name,
0639         event_log::registration_mode reg_mode);
0640 #endif // BOOST_LOG_DOXYGEN_PASS
0641 };
0642 
0643 #ifdef BOOST_LOG_USE_CHAR
0644 typedef basic_simple_event_log_backend< char > simple_event_log_backend;      //!< Convenience typedef for narrow-character logging
0645 typedef basic_event_log_backend< char > event_log_backend;                    //!< Convenience typedef for narrow-character logging
0646 #endif
0647 #ifdef BOOST_LOG_USE_WCHAR_T
0648 typedef basic_simple_event_log_backend< wchar_t > wsimple_event_log_backend;  //!< Convenience typedef for wide-character logging
0649 typedef basic_event_log_backend< wchar_t > wevent_log_backend;                //!< Convenience typedef for wide-character logging
0650 #endif
0651 
0652 } // namespace sinks
0653 
0654 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0655 
0656 } // namespace boost
0657 
0658 #include <boost/log/detail/footer.hpp>
0659 
0660 #endif // BOOST_LOG_WITHOUT_EVENT_LOG
0661 
0662 #endif // BOOST_LOG_SINKS_EVENT_LOG_BACKEND_HPP_INCLUDED_