4.6.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::name const &) |
Constructs a root logger object. | |
FCPPT_LOG_DETAIL_SYMBOL | object (fcppt::log::object const &parent, fcppt::log::name const &) |
Constructs a child logger object. | |
FCPPT_LOG_DETAIL_SYMBOL | object (fcppt::log::context_reference, fcppt::log::location const &, fcppt::log::name const &) |
Constructs a log at a specific location. | |
FCPPT_LOG_DETAIL_SYMBOL | ~object () |
FCPPT_LOG_DETAIL_SYMBOL void | log (fcppt::log::level level, fcppt::log::detail::temporary_output const &output) const |
Logs a message. | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream const & | level_sink (fcppt::log::level level) const |
The level stream corresponding to a log level. | |
FCPPT_LOG_DETAIL_SYMBOL bool | enabled (fcppt::log::level level) const |
Returns if a level is activated. | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::level_stream_array const & | level_streams () const |
Returns the associated level streams. | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::optional_level | level () const |
Returns the current log level. | |
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::context_reference | , |
fcppt::log::name const & | ) |
Constructs a root logger object.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::object const & | parent, |
fcppt::log::name const & | ) |
Constructs a child logger object.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::object | ( | fcppt::log::context_reference | , |
fcppt::log::location const & | , | ||
fcppt::log::name const & | ) |
Constructs a log at a specific location.
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::object::~object | ( | ) |
|
nodiscard |
Returns if a level is activated.
level | The log level to query the activated state for |
|
nodiscard |
Returns the current log level.
|
nodiscard |
The level stream corresponding to a log level.
level | The log level to get the level stream for |
|
nodiscard |
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 ) const |
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 |