A simple thread-safe logger for the channel specified in the constructor.
More...
#include <Logger.hpp>
|
| Logger (std::string channel) |
| Construct a new Logger object that produces loglines for the specified channel.
|
|
| Logger (Logger const &)=default |
|
| Logger (Logger &&)=default |
|
Logger & | operator= (Logger const &)=default |
|
Logger & | operator= (Logger &&)=default |
|
Pump | trace (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::TRC severity.
|
|
Pump | debug (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::DBG severity.
|
|
Pump | info (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::NFO severity.
|
|
Pump | warn (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::WRN severity.
|
|
Pump | error (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::ERR severity.
|
|
Pump | fatal (SourceLocationType const &loc=CURRENT_SRC_LOCATION) const |
| Interface for logging at Severity::FTL severity.
|
|
|
static constexpr std::array< char const *, 8 > | kCHANNELS |
|
A simple thread-safe logger for the channel specified in the constructor.
This is cheap to copy and move. Designed to be used as a member variable or otherwise. See LogService::init() for setup of the logging core and severity levels for each channel.
◆ Logger()
util::Logger::Logger |
( |
std::string | channel | ) |
|
|
inline |
Construct a new Logger object that produces loglines for the specified channel.
See LogService::init() for general setup and configuration of severity levels per channel.
- Parameters
-
channel | The channel this logger will report into. |
◆ debug()
Logger::Pump util::Logger::debug |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::DBG severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ error()
Logger::Pump util::Logger::error |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::ERR severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ fatal()
Logger::Pump util::Logger::fatal |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::FTL severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ info()
Logger::Pump util::Logger::info |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::NFO severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ trace()
Logger::Pump util::Logger::trace |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::TRC severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ warn()
Logger::Pump util::Logger::warn |
( |
SourceLocationType const & | loc = CURRENT_SRC_LOCATION | ) |
const |
|
nodiscard |
Interface for logging at Severity::WRN severity.
- Parameters
-
loc | The source location of the log message |
- Returns
- The pump to use for logging
◆ kCHANNELS
std::array<char const*, 8> util::Logger::kCHANNELS |
|
staticconstexpr |
Initial value:= {
"General",
"WebServer",
"Backend",
"RPC",
"ETL",
"Subscriptions",
"Performance",
"Migration",
}
The documentation for this class was generated from the following files:
- /__w/clio/clio/src/util/log/Logger.hpp
- /__w/clio/clio/src/util/log/Logger.cpp