|
lintel 0.2.0
|
#include <LoggerService.h>
Public Member Functions | |
| LoggerService () | |
| LoggerService (std::shared_ptr< ProcessName > processName, std::shared_ptr< Configuration > configuration) | |
| ~LoggerService () | |
| template<typename... Args> | |
| void | log (const char *file, int line, const char *function, LogLevel lvl, std::string_view message, Args &&...args) |
Static Public Member Functions | |
| static LoggerService & | getOrCreate (const std::shared_ptr< ProcessName > &processInfo, const std::shared_ptr< Configuration > &configuration) |
| static LoggerService & | get () |
| static void | initSingleton (const std::shared_ptr< ProcessName > &processInfo, const std::shared_ptr< Configuration > &configuration) |
| static void | initSingleton2 () |
Singleton service providing spdlog-based logging for the application.
| lintel::LoggerService::LoggerService | ( | ) |
Default constructor.
| lintel::LoggerService::LoggerService | ( | std::shared_ptr< ProcessName > | processName, |
| std::shared_ptr< Configuration > | configuration | ||
| ) |
Construct a LoggerService with the given process name and configuration.
| processName | the process name |
| configuration | the application configuration |
| lintel::LoggerService::~LoggerService | ( | ) |
Destructor.
|
static |
Get the singleton logger service instance.
|
static |
Get or create the singleton logger service instance.
| processInfo | the process name information |
| configuration | the application configuration |
|
static |
Initialize the singleton with the given parameters.
| processInfo | the process name information |
| configuration | the application configuration |
Initialize the singleton a second time (re-init).
|
inline |
Log a formatted message at the given level with source location. Template-eliminated: boxes the arguments (std::make_format_args) and defers all formatting to the non-template logImpl() in LoggerService.cpp.
| Args | the argument types |
| file | the source file name |
| line | the source line number |
| function | the source function name |
| lvl | the log level |
| message | the format string |
| args | the format arguments |