|
Avara3D 0.2.0
C++ API reference
|
Dispatches severity-filtered log messages to one or more LogSink objects. More...
#include <a3d/log/Log.h>
Public Member Functions | |
| Log () | |
| Creates an unnamed Log with default thresholds and no sinks. More... | |
| Log (const std::string &name, std::unique_ptr< LogSink > sink, Level level=DEFAULT_LEVEL, Level flushLevel=DEFAULT_FLUSH_LEVEL) | |
Creates a named Log that takes ownership of sink. More... | |
| Log (const std::string &name, std::vector< std::unique_ptr< LogSink > > sinks, Level level=DEFAULT_LEVEL, Level flushLevel=DEFAULT_FLUSH_LEVEL) | |
Creates a named Log that takes ownership of sinks. More... | |
| const std::string & | name () const |
| Returns the name included in formatted log output. More... | |
| const std::vector< std::unique_ptr< LogSink > > & | sinks () const |
| Returns the sinks owned by the Log. More... | |
| Level | level () const |
| Returns the minimum severity currently emitted by the Log. More... | |
| void | level (Level level) |
| Sets the minimum emitted severity; Level::Off disables message emission. More... | |
| Level | flushLevel () const |
| Returns the severity threshold that triggers an automatic sink flush. More... | |
| void | flushLevel (Level flushLevel) |
| Sets the severity threshold that triggers an automatic sink flush. More... | |
| void | trace (const std::string &msg) |
Emits msg at Trace severity when enabled. More... | |
| void | debug (const std::string &msg) |
Emits msg at Debug severity when enabled. More... | |
| void | info (const std::string &msg) |
Emits msg at Info severity when enabled. More... | |
| void | warn (const std::string &msg) |
Emits msg at Warn severity when enabled. More... | |
| void | error (const std::string &msg) |
Emits msg at Error severity when enabled. More... | |
| void | fatal (const std::string &msg) |
Emits msg at Fatal severity when enabled. More... | |
| void | flush () |
| Flushes every owned sink. More... | |
Dispatches severity-filtered log messages to one or more LogSink objects.
A Log owns its sinks. Messages below level() are ignored; messages at or above flushLevel() cause all sinks to be flushed after the message is dispatched.
| a3d::log::Log::Log | ( | ) |
Creates an unnamed Log with default thresholds and no sinks.
| a3d::log::Log::Log | ( | const std::string & | name, |
| std::unique_ptr< LogSink > | sink, | ||
| Level | level = DEFAULT_LEVEL, |
||
| Level | flushLevel = DEFAULT_FLUSH_LEVEL |
||
| ) |
| a3d::log::Log::Log | ( | const std::string & | name, |
| std::vector< std::unique_ptr< LogSink > > | sinks, | ||
| Level | level = DEFAULT_LEVEL, |
||
| Level | flushLevel = DEFAULT_FLUSH_LEVEL |
||
| ) |
Creates a named Log that takes ownership of sinks.
| void a3d::log::Log::debug | ( | const std::string & | msg | ) |
Emits msg at Debug severity when enabled.
| void a3d::log::Log::error | ( | const std::string & | msg | ) |
Emits msg at Error severity when enabled.
| void a3d::log::Log::fatal | ( | const std::string & | msg | ) |
Emits msg at Fatal severity when enabled.
| void a3d::log::Log::flush | ( | ) |
Flushes every owned sink.
| Level a3d::log::Log::flushLevel | ( | ) | const |
Returns the severity threshold that triggers an automatic sink flush.
| void a3d::log::Log::flushLevel | ( | Level | flushLevel | ) |
Sets the severity threshold that triggers an automatic sink flush.
| void a3d::log::Log::info | ( | const std::string & | msg | ) |
Emits msg at Info severity when enabled.
| Level a3d::log::Log::level | ( | ) | const |
Returns the minimum severity currently emitted by the Log.
| void a3d::log::Log::level | ( | Level | level | ) |
Sets the minimum emitted severity; Level::Off disables message emission.
| const std::string & a3d::log::Log::name | ( | ) | const |
Returns the name included in formatted log output.
| const std::vector< std::unique_ptr< LogSink > > & a3d::log::Log::sinks | ( | ) | const |
Returns the sinks owned by the Log.
| void a3d::log::Log::trace | ( | const std::string & | msg | ) |
Emits msg at Trace severity when enabled.
| void a3d::log::Log::warn | ( | const std::string & | msg | ) |
Emits msg at Warn severity when enabled.