File indexing completed on 2025-01-18 09:39:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_LOG_SOURCES_SEVERITY_CHANNEL_LOGGER_HPP_INCLUDED_
0016 #define BOOST_LOG_SOURCES_SEVERITY_CHANNEL_LOGGER_HPP_INCLUDED_
0017
0018 #include <string>
0019 #include <boost/log/detail/config.hpp>
0020 #if !defined(BOOST_LOG_NO_THREADS)
0021 #include <boost/log/detail/light_rw_mutex.hpp>
0022 #endif
0023 #include <boost/log/sources/features.hpp>
0024 #include <boost/log/sources/basic_logger.hpp>
0025 #include <boost/log/sources/threading_models.hpp>
0026 #include <boost/log/sources/severity_feature.hpp>
0027 #include <boost/log/sources/channel_feature.hpp>
0028 #include <boost/log/detail/header.hpp>
0029
0030 #ifdef BOOST_HAS_PRAGMA_ONCE
0031 #pragma once
0032 #endif
0033
0034 namespace boost {
0035
0036 BOOST_LOG_OPEN_NAMESPACE
0037
0038 namespace sources {
0039
0040 #ifndef BOOST_LOG_DOXYGEN_PASS
0041
0042 #ifdef BOOST_LOG_USE_CHAR
0043
0044
0045 template< typename LevelT = int, typename ChannelT = std::string >
0046 class severity_channel_logger :
0047 public basic_composite_logger<
0048 char,
0049 severity_channel_logger< LevelT, ChannelT >,
0050 single_thread_model,
0051 features<
0052 severity< LevelT >,
0053 channel< ChannelT >
0054 >
0055 >
0056 {
0057 BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE(severity_channel_logger)
0058 };
0059
0060 #if !defined(BOOST_LOG_NO_THREADS)
0061
0062
0063 template< typename LevelT = int, typename ChannelT = std::string >
0064 class severity_channel_logger_mt :
0065 public basic_composite_logger<
0066 char,
0067 severity_channel_logger_mt< LevelT, ChannelT >,
0068 multi_thread_model< boost::log::aux::light_rw_mutex >,
0069 features<
0070 severity< LevelT >,
0071 channel< ChannelT >
0072 >
0073 >
0074 {
0075 BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE(severity_channel_logger_mt)
0076 };
0077
0078 #endif
0079
0080 #endif
0081
0082 #ifdef BOOST_LOG_USE_WCHAR_T
0083
0084
0085 template< typename LevelT = int, typename ChannelT = std::wstring >
0086 class wseverity_channel_logger :
0087 public basic_composite_logger<
0088 wchar_t,
0089 wseverity_channel_logger< LevelT, ChannelT >,
0090 single_thread_model,
0091 features<
0092 severity< LevelT >,
0093 channel< ChannelT >
0094 >
0095 >
0096 {
0097 BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE(wseverity_channel_logger)
0098 };
0099
0100 #if !defined(BOOST_LOG_NO_THREADS)
0101
0102
0103 template< typename LevelT = int, typename ChannelT = std::wstring >
0104 class wseverity_channel_logger_mt :
0105 public basic_composite_logger<
0106 wchar_t,
0107 wseverity_channel_logger_mt< LevelT, ChannelT >,
0108 multi_thread_model< boost::log::aux::light_rw_mutex >,
0109 features<
0110 severity< LevelT >,
0111 channel< ChannelT >
0112 >
0113 >
0114 {
0115 BOOST_LOG_FORWARD_LOGGER_MEMBERS_TEMPLATE(wseverity_channel_logger_mt)
0116 };
0117
0118 #endif
0119
0120 #endif
0121
0122 #else
0123
0124
0125
0126
0127
0128
0129 template< typename LevelT = int, typename ChannelT = std::string >
0130 class severity_channel_logger :
0131 public basic_composite_logger<
0132 char,
0133 severity_channel_logger< LevelT, ChannelT >,
0134 single_thread_model,
0135 features<
0136 severity< LevelT >,
0137 channel< ChannelT >
0138 >
0139 >
0140 {
0141 public:
0142
0143
0144
0145 severity_channel_logger();
0146
0147
0148
0149 severity_channel_logger(severity_channel_logger const& that);
0150
0151
0152
0153 template< typename... ArgsT >
0154 explicit severity_channel_logger(ArgsT... const& args);
0155
0156
0157
0158 severity_channel_logger& operator= (severity_channel_logger const& that)
0159
0160
0161
0162 void swap(severity_channel_logger& that);
0163 };
0164
0165
0166
0167
0168
0169
0170 template< typename LevelT = int, typename ChannelT = std::string >
0171 class severity_channel_logger_mt :
0172 public basic_composite_logger<
0173 char,
0174 severity_channel_logger_mt< LevelT, ChannelT >,
0175 multi_thread_model< implementation_defined >,
0176 features<
0177 severity< LevelT >,
0178 channel< ChannelT >
0179 >
0180 >
0181 {
0182 public:
0183
0184
0185
0186 severity_channel_logger_mt();
0187
0188
0189
0190 severity_channel_logger_mt(severity_channel_logger_mt const& that);
0191
0192
0193
0194 template< typename... ArgsT >
0195 explicit severity_channel_logger_mt(ArgsT... const& args);
0196
0197
0198
0199 severity_channel_logger_mt& operator= (severity_channel_logger_mt const& that)
0200
0201
0202
0203 void swap(severity_channel_logger_mt& that);
0204 };
0205
0206
0207
0208
0209
0210
0211 template< typename LevelT = int, typename ChannelT = std::wstring >
0212 class wseverity_channel_logger :
0213 public basic_composite_logger<
0214 wchar_t,
0215 wseverity_channel_logger< LevelT, ChannelT >,
0216 single_thread_model,
0217 features<
0218 severity< LevelT >,
0219 channel< ChannelT >
0220 >
0221 >
0222 {
0223 public:
0224
0225
0226
0227 wseverity_channel_logger();
0228
0229
0230
0231 wseverity_channel_logger(wseverity_channel_logger const& that);
0232
0233
0234
0235 template< typename... ArgsT >
0236 explicit wseverity_channel_logger(ArgsT... const& args);
0237
0238
0239
0240 wseverity_channel_logger& operator= (wseverity_channel_logger const& that)
0241
0242
0243
0244 void swap(wseverity_channel_logger& that);
0245 };
0246
0247
0248
0249
0250
0251
0252 template< typename LevelT = int, typename ChannelT = std::wstring >
0253 class wseverity_channel_logger_mt :
0254 public basic_composite_logger<
0255 wchar_t,
0256 wseverity_channel_logger_mt< LevelT, ChannelT >,
0257 multi_thread_model< implementation_defined >,
0258 features<
0259 severity< LevelT >,
0260 channel< ChannelT >
0261 >
0262 >
0263 {
0264 public:
0265
0266
0267
0268 wseverity_channel_logger_mt();
0269
0270
0271
0272 wseverity_channel_logger_mt(wseverity_channel_logger_mt const& that);
0273
0274
0275
0276 template< typename... ArgsT >
0277 explicit wseverity_channel_logger_mt(ArgsT... const& args);
0278
0279
0280
0281 wseverity_channel_logger_mt& operator= (wseverity_channel_logger_mt const& that)
0282
0283
0284
0285 void swap(wseverity_channel_logger_mt& that);
0286 };
0287
0288 #endif
0289
0290 }
0291
0292 BOOST_LOG_CLOSE_NAMESPACE
0293
0294 }
0295
0296
0297 #define BOOST_LOG_STREAM_CHANNEL_SEV(logger, chan, lvl)\
0298 BOOST_LOG_STREAM_WITH_PARAMS((logger), (::boost::log::keywords::channel = (chan))(::boost::log::keywords::severity = (lvl)))
0299
0300 #ifndef BOOST_LOG_NO_SHORTHAND_NAMES
0301
0302
0303 #define BOOST_LOG_CHANNEL_SEV(logger, chan, lvl) BOOST_LOG_STREAM_CHANNEL_SEV(logger, chan, lvl)
0304
0305 #endif
0306
0307 #include <boost/log/detail/footer.hpp>
0308
0309 #endif