# Top level headers

Andrey Semashev

13.07.2009

This header includes other Boost.Log headers with all attributes.

Andrey Semashev

14.03.2009

This header includes other Boost.Log headers that are commonly used in logging applications. Note that the header does not include any headers required to setup the library, as usually they aren't needed in more than one translation unit of the application.

Andrey Semashev

19.04.2007

This header includes Boost.Log headers related to the logging core.

Andrey Semashev

31.10.2009

The header contains exception classes declarations. bad_alloc Base class for memory allocation errors.

Exceptions derived from this class indicate problems with memory allocation.

`const char *`

Initializing constructor. Creates an exception with the specified error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

const char *

Error message accessor.

bad_alloc The exception is used to indicate reaching a storage capacity limit. `const char *`

Initializing constructor. Creates an exception with the specified error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Exception class that is used to indicate conversion errors.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Exception class that is used to indicate errors of incorrect type of an object.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Exception class that is used to indicate errors of incorrect value of an object.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

logic_error Exception class that is used to indicate library limitation.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

logic_error Base class for logic exceptions from the logging library.

Exceptions derived from this class usually indicate errors on the user's side, such as incorrect library usage.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Exception class that is used to indicate errors of missing values.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

logic_error Exception class that is used to indicate ODR violation.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Exception class that is used to indicate parsing errors.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

runtime_error Base class for runtime exceptions from the logging library.

Exceptions derived from this class indicate a problem that may not directly be caused by the user's code that interacts with the library, such as errors caused by input data.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

logic_error Exception class that is used to indicate invalid library setup.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

system_error Exception class that is used to indicate underlying OS API errors. `boost::system::error_code` `std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

logic_error Exception class that is used to indicate invalid call sequence.

Default constructor. Creates an exception with the default error message.

`std::string const &`

Initializing constructor. Creates an exception with the specified error message.

Destructor

Andrey Semashev

10.11.2012

This header includes other Boost.Log headers with all template expression tools.

Andrey Semashev

13.07.2009

This header includes other Boost.Log headers with all sinks.

Andrey Semashev

07.11.2009

This header defines tools for trivial logging support Trivial logger tag.

This tag can be used to acquire the logger that is used with trivial logging macros. This may be useful when the logger is used with other macros which require a logger.

Logger type. trivial::logger_type logger_type &

Returns a reference to the trivial logger instance

Trivial severity levels. Trivial logger type. sources::severity_logger_mt< severity_level > `const CharT * `severity_level`Returns stringized enumeration value or `NULL`, if the value is not valid.` `const char *`severity_level`Returns stringized enumeration value or `NULL`, if the value is not valid.` `bool `const CharT *``std::size_t``severity_level &`Parses enumeration value from string and returns `true` on success and `false` otherwise.` `std::basic_ostream< CharT, TraitsT > & `std::basic_ostream< CharT, TraitsT > &``severity_level`Outputs stringized representation of the severity level to the stream.` `std::basic_istream< CharT, TraitsT > & `std::basic_istream< CharT, TraitsT > &``severity_level &`Reads stringized representation of the severity level from the stream.`

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:

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