Logger utility class that wraps spdlog functionality.
More...
#include <logger.h>
|
static void | init (Level level=Level::INFO) |
| Initialize the logger.
|
|
static void | setLevel (Level level) |
| Set the log level.
|
|
static spdlog::level::level_enum | toSpdlogLevel (Level level) |
| Convert Level enum to spdlog level.
|
|
template<typename... Args> |
static void | trace (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at trace level.
|
|
template<typename... Args> |
static void | debug (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at debug level.
|
|
template<typename... Args> |
static void | info (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at info level.
|
|
template<typename... Args> |
static void | warn (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at warn level.
|
|
template<typename... Args> |
static void | error (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at error level.
|
|
template<typename... Args> |
static void | critical (fmt::format_string< Args... > fmt, Args &&... args) |
| Log a message at critical level.
|
|
Logger utility class that wraps spdlog functionality.
- Examples
- actor_agent_example.cpp.
◆ Level
The log level.
Enumerator |
---|
TRACE | Trace logging level.
|
DEBUG | Debug logging level.
|
INFO | Info logging level.
|
WARN | Warning logging level.
|
ERROR | Error logging level.
|
CRITICAL | Critical logging level.
|
OFF | Logging disabled level.
|
◆ critical()
template<typename... Args>
static void agents::Logger::critical |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at critical level.
- Parameters
-
fmt | The format string |
args | The arguments |
◆ debug()
template<typename... Args>
static void agents::Logger::debug |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at debug level.
- Parameters
-
fmt | The format string |
args | The arguments |
◆ error()
template<typename... Args>
static void agents::Logger::error |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at error level.
- Parameters
-
fmt | The format string |
args | The arguments |
◆ info()
template<typename... Args>
static void agents::Logger::info |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at info level.
- Parameters
-
fmt | The format string |
args | The arguments |
◆ init()
Initialize the logger.
- Parameters
-
◆ setLevel()
static void agents::Logger::setLevel |
( |
Level | level | ) |
|
|
static |
Set the log level.
- Parameters
-
◆ toSpdlogLevel()
static spdlog::level::level_enum agents::Logger::toSpdlogLevel |
( |
Level | level | ) |
|
|
static |
Convert Level enum to spdlog level.
- Parameters
-
- Returns
- The spdlog level
◆ trace()
template<typename... Args>
static void agents::Logger::trace |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at trace level.
- Parameters
-
fmt | The format string |
args | The arguments |
◆ warn()
template<typename... Args>
static void agents::Logger::warn |
( |
fmt::format_string< Args... > | fmt, |
|
|
Args &&... | args ) |
|
inlinestatic |
Log a message at warn level.
- Parameters
-
fmt | The format string |
args | The arguments |