|
static std::expected< void, std::string > | init (config::ClioConfigDefinition const &config) |
| Global log core initialization from a config::ClioConfigDefinition.
|
static void | shutdown () |
| Shutdown spdlog to guarantee output is not lost.
|
static Logger::Pump | trace (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::TRC severity.
|
static Logger::Pump | debug (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::DBG severity.
|
static Logger::Pump | info (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::NFO severity.
|
static Logger::Pump | warn (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::WRN severity.
|
static Logger::Pump | error (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::ERR severity.
|
static Logger::Pump | fatal (SourceLocationType const &loc=CURRENT_SRC_LOCATION) |
| Globally accessible General logger at Severity::FTL severity.
|
|
static void | init (bool isAsync, Severity defaultSeverity, std::vector< std::shared_ptr< spdlog::sinks::sink > > const &sinks) |
| Initialize the logging core with specified parameters.
|
static bool | initialized () |
| Whether the LogService is initialized or not.
|
static void | reset () |
| Reset the logging service to uninitialized state.
|
static void | replaceSinks (std::vector< std::shared_ptr< spdlog::sinks::sink > > const &sinks) |
| Replace the current sinks with a new set of sinks.
|
static std::shared_ptr< spdlog::logger > | registerLogger (std::string const &channel, std::optional< Severity > severity=std::nullopt) |
| Register a new logger for the specified channel.
|
static bool | isAsync_ {true} |
static Severity | defaultSeverity_ {Severity::NFO} |
static std::vector< std::shared_ptr< spdlog::sinks::sink > > | sinks_ {} |
static bool | initialized_ {false} |
A global logging service.
Used to initialize and setup the logging core as well as a globally available entrypoint for logging into the General channel as well as raising alerts.