|
Clio
develop
The XRP Ledger API server.
|
Base state management class for the logging service. More...
#include <Logger.hpp>

Static Protected Member Functions | |
| 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_view channel, std::optional< Severity > severity=std::nullopt) |
| Register a new logger for the specified channel. | |
Static Protected Attributes | |
| static bool | isAsync_ {true} |
| static Severity | defaultSeverity_ {Severity::NFO} |
| static std::vector< std::shared_ptr< spdlog::sinks::sink > > | sinks_ {} |
| static bool | initialized_ {false} |
Friends | |
| struct | ::LogServiceInitTests |
| class | ::LoggerFixture |
| class | Logger |
| class | ::util::impl::OnAssert |
Base state management class for the logging service.
This class manages the global state and core functionality for the logging system, including initialization, sink management, and logger registration.
|
staticprotected |
Initialize the logging core with specified parameters.
| isAsync | Whether logging should be asynchronous |
| defaultSeverity | The default severity level for new loggers |
| sinks | Vector of spdlog sinks to use for output |
|
staticnodiscardprotected |
Whether the LogService is initialized or not.
|
staticprotected |
Register a new logger for the specified channel.
Creates and registers a new spdlog logger instance for the given channel with the specified or default severity level.
| channel | The name of the logging channel |
| severity | Optional severity level override; uses default if not specified |
|
staticprotected |
Replace the current sinks with a new set of sinks.
| sinks | Vector of new spdlog sinks to replace the current ones |