boost::logging::profile::compute_for_logger< logger_type > Struct Template Reference

Allows you to compute profiling for your logger class. More...

List of all members.


Detailed Description

template<class logger_type>
struct boost::logging::profile::compute_for_logger< logger_type >

Allows you to compute profiling for your logger class.

#include <boost/logging/profile.hpp>

To do profiling for a logger, just surround it with compute_for_logger. Example:

Old code

#include <boost/logging/format_fwd.hpp>

namespace bl = boost::logging ;
typedef bl::logger_format_write< > logger_type;

BOOST_DECLARE_LOG(g_l, logger_type) 
...
BOOST_DEFINE_LOG(g_l, logger_type) 

New code

#include <boost/logging/format_fwd.hpp>
#include <boost/logging/profile.hpp>

namespace bl = boost::logging ;
typedef bl::logger_format_write< > raw_log_type;
typedef bl::profile::compute_for_logger<raw_log_type>::type logger_type;

BOOST_DECLARE_LOG(g_l, logger_type) 
...
BOOST_DEFINE_LOG(g_l, logger_type) 

See also:
compute_for_filter
Examples:

use_profiler.cpp.


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

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