Back to home page

EIC code displayed by LXR

 
 

    


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

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   logger.hpp
0009  * \author Andrey Semashev
0010  * \date   08.03.2007
0011  *
0012  * The header contains implementation of a simplistic logger with no features.
0013  */
0014 
0015 #ifndef BOOST_LOG_SOURCES_LOGGER_HPP_INCLUDED_
0016 #define BOOST_LOG_SOURCES_LOGGER_HPP_INCLUDED_
0017 
0018 #include <boost/log/detail/config.hpp>
0019 #include <boost/log/sources/basic_logger.hpp>
0020 #include <boost/log/sources/features.hpp>
0021 #include <boost/log/sources/threading_models.hpp>
0022 #if !defined(BOOST_LOG_NO_THREADS)
0023 #include <boost/log/detail/light_rw_mutex.hpp>
0024 #endif // !defined(BOOST_LOG_NO_THREADS)
0025 #include <boost/log/detail/header.hpp>
0026 
0027 #ifdef BOOST_HAS_PRAGMA_ONCE
0028 #pragma once
0029 #endif
0030 
0031 namespace boost {
0032 
0033 BOOST_LOG_OPEN_NAMESPACE
0034 
0035 namespace sources {
0036 
0037 #ifdef BOOST_LOG_USE_CHAR
0038 
0039 /*!
0040  * \brief Narrow-char logger. Functionally equivalent to \c basic_logger.
0041  *
0042  * See \c basic_logger class template for a more detailed description.
0043  */
0044 class logger :
0045     public basic_composite_logger< char, logger, single_thread_model, features< > >
0046 {
0047     BOOST_LOG_FORWARD_LOGGER_MEMBERS(logger)
0048 };
0049 
0050 #if !defined(BOOST_LOG_NO_THREADS)
0051 
0052 /*!
0053  * \brief Narrow-char thread-safe logger. Functionally equivalent to \c basic_logger.
0054  *
0055  * See \c basic_logger class template for a more detailed description.
0056  */
0057 class logger_mt :
0058     public basic_composite_logger< char, logger_mt, multi_thread_model< boost::log::aux::light_rw_mutex >, features< > >
0059 {
0060     BOOST_LOG_FORWARD_LOGGER_MEMBERS(logger_mt)
0061 };
0062 
0063 #endif // !defined(BOOST_LOG_NO_THREADS)
0064 #endif // BOOST_LOG_USE_CHAR
0065 
0066 #ifdef BOOST_LOG_USE_WCHAR_T
0067 
0068 /*!
0069  * \brief Wide-char logger. Functionally equivalent to \c basic_logger.
0070  *
0071  * See \c basic_logger class template for a more detailed description.
0072  */
0073 class wlogger :
0074     public basic_composite_logger< wchar_t, wlogger, single_thread_model, features< > >
0075 {
0076     BOOST_LOG_FORWARD_LOGGER_MEMBERS(wlogger)
0077 };
0078 
0079 #if !defined(BOOST_LOG_NO_THREADS)
0080 
0081 /*!
0082  * \brief Wide-char thread-safe logger. Functionally equivalent to \c basic_logger.
0083  *
0084  * See \c basic_logger class template for a more detailed description.
0085  */
0086 class wlogger_mt :
0087     public basic_composite_logger< wchar_t, wlogger_mt, multi_thread_model< boost::log::aux::light_rw_mutex >, features< > >
0088 {
0089     BOOST_LOG_FORWARD_LOGGER_MEMBERS(wlogger_mt)
0090 };
0091 
0092 #endif // !defined(BOOST_LOG_NO_THREADS)
0093 #endif // BOOST_LOG_USE_WCHAR_T
0094 
0095 } // namespace sources
0096 
0097 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0098 
0099 } // namespace boost
0100 
0101 #include <boost/log/detail/footer.hpp>
0102 
0103 #endif // BOOST_LOG_SOURCES_LOGGER_HPP_INCLUDED_