4.3.0
|
|
Freundlich's C++ toolkit |
The main log class.
Logging is done through objects of this class. In the constructor, it gets a log context and a log location, providing it with a log level and level streams.
Public Member Functions | |
FCPPT_LOG_DETAIL_SYMBOL | object (fcppt::log::context_reference, fcppt::log::parameters const &) |
Constructs a root logger object. More... | |
FCPPT_LOG_DETAIL_SYMBOL | object (fcppt::log::object const &parent, fcppt::log::parameters const &) |
Constructs a child logger object. More... | |
FCPPT_LOG_DETAIL_SYMBOL | object (fcppt::log::context_reference, fcppt::log::location const &, fcppt::log::parameters const &) |
Constructs a log at a specific location. More... | |
FCPPT_LOG_DETAIL_SYMBOL | ~object () |
FCPPT_LOG_DETAIL_SYMBOL void | log (fcppt::log::level level, fcppt::log::detail::temporary_output const &output) |
Logs a message. More... | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream const & | level_sink (fcppt::log::level level) const |
The level stream corresponding to a log level. More... | |
FCPPT_LOG_DETAIL_SYMBOL bool | enabled (fcppt::log::level level) const |
Returns if a level is activated. More... | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::format::optional_function const & | formatter () const |
Returns the associated formatter. More... | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream_array const & | level_streams () const |
Returns the associated level streams. More... | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level | level () const |
Returns the current log level. More... | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::context_reference | , |
fcppt::log::parameters const & | |||
) |
Constructs a root logger object.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::object const & | parent, |
fcppt::log::parameters const & | |||
) |
Constructs a child logger object.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::context_reference | , |
fcppt::log::location const & | , | ||
fcppt::log::parameters const & | |||
) |
Constructs a log at a specific location.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::~object | ( | ) |
FCPPT_LOG_DETAIL_SYMBOL bool fcppt::log::object::enabled | ( | fcppt::log::level | level | ) | const |
Returns if a level is activated.
level | The log level to query the activated state for |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::format::optional_function const & fcppt::log::object::formatter | ( | ) | const |
Returns the associated formatter.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level fcppt::log::object::level | ( | ) | const |
Returns the current log level.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream const & fcppt::log::object::level_sink | ( | fcppt::log::level | level | ) | const |
The level stream corresponding to a log level.
level | The log level to get the level stream for |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream_array const & fcppt::log::object::level_streams | ( | ) | const |
Returns the associated level streams.
FCPPT_LOG_DETAIL_SYMBOL void fcppt::log::object::log | ( | fcppt::log::level | level, |
fcppt::log::detail::temporary_output const & | output | ||
) |
Logs a message.
Logs a message given by output to level level. If enabled(level)
is false, nothing will be logged. An output can be constructed from fcppt::log::out .
level | The log level to log to |
output | The output to log |