boost::logging::scenario::usage::use< filter_change, filter_level, logger_change, logger_favor, logger_gather > Struct Template Reference

Finds a filter class and a logger class that fit your application's needs. More...

List of all members.


Detailed Description

template<class filter_change = default_, class filter_level = default_, class logger_change = default_, class logger_favor = default_, class logger_gather = default_>
struct boost::logging::scenario::usage::use< filter_change, filter_level, logger_change, logger_favor, logger_gather >

Finds a filter class and a logger class that fit your application's needs.

For this to happen, you will first need to specify your needs (the template parameters you'll pass to this class)

Parameters:
filter_change (optional) How does the filter change? Any of the classes in the filter_::change namespace
filter_level_ (optional) Does our filter use levels? Any of the classes in the filter_::level namespace
logger_change (optional) How does our logger change? Any of the classes in the logger_::change namespace
logger_favor (optional) What does the logger favor? Any of the classes in the logger_::favor namespace
logger_gather (optional) What to use as gather class. Any of the classes in the logger_::gather namespace
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:

Examples:

using_tags.cpp, and your_scenario.cpp.


The documentation for this struct was generated from the following file:

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