format_fwd.hpp File Reference

Include dependency graph for format_fwd.hpp:

This graph shows which files directly or indirectly include this file:

Detailed Description

Include this file when you're using formatters and destinations, and you want to declare the logger classes, in a header file (using BOOST_DECLARE_LOG)


#ifndef LOG_H_header
#define LOG_H_header

#include <boost/logging/logging.hpp>
#include <boost/logging/format/optimize.hpp>

BOOST_LOG_FORMAT_MSG( boost::logging::optimize::cache_string_one_str<> ) 

#include <boost/logging/format.hpp>

typedef logger_format_write< > logger_type;

BOOST_DECLARE_LOG(g_l, logger_type)
BOOST_DECLARE_LOG_FILTER(g_l_filter, level::holder)

#define LDBG_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l(), g_log_level(), debug ) << "[dbg] "
#define LERR_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l(), g_log_level(), error ) << "[ERR] "
#define LAPP_ BOOST_LOG_USE_LOG_IF_LEVEL(g_l(), g_log_level(), info ) << "[app] "

void init_logs();


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