A simple logging utility.
More...
#include <logger.hpp>
|
| static void | setLogLevel (LogLevel level) |
| | Sets the current log level.
|
| |
| static void | debug (const std::string &message) |
| | Logs a debug message.
|
| |
| static void | info (const std::string &message) |
| | Logs an informational message.
|
| |
| static void | warning (const std::string &message) |
| | Logs a warning message.
|
| |
| static void | error (const std::string &message) |
| | Logs an error message.
|
| |
A simple logging utility.
The Logger class provides static methods for logging messages at different log levels. The current log level determines which messages are actually output.
◆ debug()
| void common::Logger::debug |
( |
const std::string & |
message | ) |
|
|
static |
Logs a debug message.
- Parameters
-
| message | The debug message to log. |
◆ error()
| void common::Logger::error |
( |
const std::string & |
message | ) |
|
|
static |
Logs an error message.
- Parameters
-
| message | The error message to log. |
◆ info()
| void common::Logger::info |
( |
const std::string & |
message | ) |
|
|
static |
Logs an informational message.
- Parameters
-
| message | The informational message to log. |
◆ logLevelToString()
| std::string common::Logger::logLevelToString |
( |
LogLevel |
level | ) |
|
|
staticprivate |
Converts a LogLevel to its string representation.
- Parameters
-
| level | The log level to convert. |
- Returns
- A string representing the log level.
◆ setLogLevel()
| void common::Logger::setLogLevel |
( |
LogLevel |
level | ) |
|
|
static |
Sets the current log level.
Only messages with a log level equal to or higher than the current log level will be output.
- Parameters
-
| level | The new log level to be set. |
◆ warning()
| void common::Logger::warning |
( |
const std::string & |
message | ) |
|
|
static |
Logs a warning message.
- Parameters
-
| message | The warning message to log. |
◆ currentLevel
The current logging level.
Only messages with a log level equal to or higher than this value will be logged.
The documentation for this class was generated from the following files: