Logging. Messages are stamped with the runtime time and tick number they were logged in.
More...
#include <Log.hpp>
|
| template<class... Args> |
| static void | debug (std::format_string< Args... > format, Args &&... args) |
| template<class... Args> |
| static void | info (std::format_string< Args... > format, Args &&... args) |
| template<class... Args> |
| static void | warn (std::format_string< Args... > format, Args &&... args) |
| template<class... Args> |
| static void | error (std::format_string< Args... > format, Args &&... args) |
| static void | setMinimumLevel (Level level) noexcept |
| | Messages below this level are dropped before they are formatted. Defaults to Info.
|
| static Level | minimumLevel () noexcept |
| static void | setOutput (Output output) |
| | Where records go. Defaults to toStdout; pass [](const Log::Record&) {} to discard.
|
| static void | toStdout (const Record &record) |
| | The default output: prints format(record) to stdout.
|
| static std::string | format (const Record &record) |
| | The standard line for a record, e.g. "[12.340s #1234] warn: message".
|
Logging. Messages are stamped with the runtime time and tick number they were logged in.
◆ Output
◆ Level
| Enumerator |
|---|
| Debug | |
| Info | |
| Warn | |
| Error | |
◆ Log()
◆ debug()
template<class... Args>
| void rz::Log::debug |
( |
std::format_string< Args... > | format, |
|
|
Args &&... | args ) |
|
inlinestatic |
◆ error()
template<class... Args>
| void rz::Log::error |
( |
std::format_string< Args... > | format, |
|
|
Args &&... | args ) |
|
inlinestatic |
◆ format()
| std::string rz::Log::format |
( |
const Record & | record | ) |
|
|
staticnodiscard |
The standard line for a record, e.g. "[12.340s #1234] warn: message".
◆ info()
template<class... Args>
| void rz::Log::info |
( |
std::format_string< Args... > | format, |
|
|
Args &&... | args ) |
|
inlinestatic |
◆ minimumLevel()
| Level rz::Log::minimumLevel |
( |
| ) |
|
|
staticnodiscardnoexcept |
◆ setMinimumLevel()
| void rz::Log::setMinimumLevel |
( |
Level | level | ) |
|
|
staticnoexcept |
Messages below this level are dropped before they are formatted. Defaults to Info.
◆ setOutput()
| void rz::Log::setOutput |
( |
Output | output | ) |
|
|
static |
◆ toStdout()
| void rz::Log::toStdout |
( |
const Record & | record | ) |
|
|
static |
The default output: prints format(record) to stdout.
◆ warn()
template<class... Args>
| void rz::Log::warn |
( |
std::format_string< Args... > | format, |
|
|
Args &&... | args ) |
|
inlinestatic |
The documentation for this class was generated from the following file: