boost::logging::scenario Namespace Reference

Use this when you have a specific scenario, and want the best logger/filter classes that fit that scenario. Check out scenario::usage and scenario::ts. More...


Namespaces

namespace  ts
 Find out the right logger/filter, based on thread-safety of logger(s)/filter(s).
namespace  usage
 If you want the library to choose the best logger/filter classes based on how your application will use the loggers and filters, use this namespace.


Detailed Description

Use this when you have a specific scenario, and want the best logger/filter classes that fit that scenario. Check out scenario::usage and scenario::ts.

For example, if you want to specify a scenario based on usage:

Example 1:

using namespace boost::logging::scenario::usage;
typedef use< filter_::change::often<10>, filter_::level::use_levels, default_, logger_::favor::speed> finder;

BOOST_DECLARE_LOG_FILTER(g_log_filter, finder::filter);
BOOST_DECLARE_LOG(g_l, finder::logger) 
...

Example 2:

using namespace boost::logging::scenario::usage;
typedef use< filter_::change::set_once_when_multiple_threads, filter_::level::no_levels, logger_::change::set_once_when_one_thread> finder;

BOOST_DECLARE_LOG_FILTER(g_log_filter, finder::filter);
BOOST_DECLARE_LOG(g_l, finder::logger) 
...

To see scenario::usage used in code:



Copyright John Torjo © 2007
Have a question/ suggestion/ comment? Send me feedback