#include "spdlog/fmt/fmt.h"
#include "spdlog/spdlog.h"
#include <stdexcept>
#include <string>
#include "logging/Logger.h"
#include <string_view>
Go to the source code of this file.
|
| #define | LOG_CRITICAL(code, ...) |
| | Logs a critical message with a runbook code.
|
| |
| #define | LOG_ERROR(code, ...) |
| | Logs an error message with a runbook code.
|
| |
|
| template<typename... Args> |
| static std::string | runbook::FormatRunbookLog (const ErrorDefinition &errorDef, const std::string_view &fmt_str, Args &&... args) |
| | Internal helper function to format the final log message.
|
| |
◆ LOG_CRITICAL
| #define LOG_CRITICAL |
( |
|
code, |
|
|
|
... |
|
) |
| |
Value: do { \
if (spdlog::default_logger()->should_log(spdlog::level::critical)) { \
spdlog::source_loc loc{__FILE__, __LINE__, __FUNCTION__}; \
spdlog::default_logger()->log(loc, spdlog::level::critical, \
spdlog::string_view_t(msg)); \
} \
} \
while (0)
static std::string FormatRunbookLog(const ErrorDefinition &errorDef, const std::string_view &fmt_str, Args &&... args)
Internal helper function to format the final log message.
Definition Runbook.h:39
Logs a critical message with a runbook code.
◆ LOG_ERROR
| #define LOG_ERROR |
( |
|
code, |
|
|
|
... |
|
) |
| |
Value: do { \
if (spdlog::default_logger()->should_log(spdlog::level::err)) { \
spdlog::source_loc loc{__FILE__, __LINE__, __FUNCTION__}; \
spdlog::default_logger()->log(loc, spdlog::level::err, \
spdlog::string_view_t(msg)); \
} \
} \
while (0)
Logs an error message with a runbook code.