Class Logger
Defined in File logger.hpp
Class Documentation
-
class Logger
Provides static logging functionality with configurable callback and log level.
The Logger class allows setting a user-defined logging callback that handles messages of a specific severity level. This class is not thread-safe.
Public Types
Public Static Functions
-
static void set_log_callback(LogCallback callback)
Sets the global logging callback.
Note
This method is not thread-safe.
- Parameters:
callback – The function to call when logging messages.
-
static void set_log_level(LogLevel level)
Sets the minimum log level to be reported.
- Parameters:
level – The minimum severity level to log.
-
static LogLevel get_log_level()
Get the current log level.
- Returns:
The minimum severity level to log.
-
static std::string level_to_string(LogLevel level)
Convert the LogLevel enum to a string.
- Parameters:
level – The log level.
- Returns:
A string that corresponding to the log level
-
static void set_log_callback(LogCallback callback)