Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
trivial.hpp File Reference
#include <iosfwd>
#include <ostream>
#include <boost/log/detail/config.hpp>
#include <boost/log/keywords/severity.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/detail/header.hpp>
#include <boost/log/detail/footer.hpp>
Include dependency graph for trivial.hpp:

Classes

struct  boost::trivial::logger
 Trivial logger tag. More...
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::trivial
 

Macros

#define BOOST_LOG_TRIVIAL(lvl)
 The macro is used to initiate logging. More...
 

Typedefs

typedef
sources::severity_logger_mt
< severity_level > 
boost::trivial::logger_type
 Trivial logger type. More...
 

Enumerations

enum  boost::trivial::severity_level {
  boost::trivial::trace,
  boost::trivial::debug,
  boost::trivial::info,
  boost::trivial::warning,
  boost::trivial::error,
  boost::trivial::fatal
}
 Trivial severity levels. More...
 

Functions

BOOST_LOG_API const char * boost::trivial::to_string (severity_level lvl)
 Returns stringized enumeration value or NULL, if the value is not valid. More...
 
template<typename CharT , typename TraitsT >
std::basic_ostream< CharT,
TraitsT > & 
boost::trivial::operator<< (std::basic_ostream< CharT, TraitsT > &strm, severity_level lvl)
 Outputs stringized representation of the severity level to the stream. More...
 
template<typename CharT , typename TraitsT >
BOOST_LOG_API
std::basic_istream< CharT,
TraitsT > & 
boost::trivial::operator>> (std::basic_istream< CharT, TraitsT > &strm, severity_level &lvl)
 Reads stringized representation of the severity level from the stream. More...
 

Detailed Description

Author
Andrey Semashev
Date
07.11.2009

This header defines tools for trivial logging support

Macro Definition Documentation

#define BOOST_LOG_TRIVIAL (   lvl)
Value:
(::boost::log::keywords::severity = ::boost::log::trivial::lvl))
severity
Definition: cpp_exceptions.hpp:37
const T & get(const T *pa, std::ptrdiff_t k)
Definition: property_map.hpp:127
#define BOOST_LOG_STREAM_WITH_PARAMS(logger, params_seq)
The macro writes a record to the log and allows to pass additional named arguments to the logger...
Definition: record_ostream.hpp:316

The macro is used to initiate logging.

The lvl argument of the macro specifies one of the following severity levels: trace, debug, info, warning, error or fatal (see severity_level enum). Following the macro, there may be a streaming expression that composes the record message string. For example:

1 BOOST_LOG_TRIVIAL(info) << "Hello, world!";