Classes | |
struct | use |
Finds a filter class and a logger class that fit your application's needs. More... | |
Namespaces | |
namespace | filter_ |
Filter usage settings : filter_::change and filter_::level. | |
namespace | logger_ |
Logger usage settings : logger_::change and logger_::favor. |
First, don't forget to
using namespace boost::logging::scenario::usage;
Then, you can specify the logger and filter, in a very easy manner
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: