#include <logger.h>
|
| static void | setLogLevel (const LogLevel &level=LogLevel::INFO) |
| |
| static void | initDb (const std::string &data_dir="") |
| | Initialize database connection.
|
| |
| static void | trace (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) |
| |
| static void | info (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) |
| |
| static void | debug (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) |
| |
| static void | warn (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) |
| |
| static void | critical (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) |
| |
A wrapper class around the spdlog's logging functions. For more info, check docs here:
- See also
- https://github.com/gabime/spdlog
◆ Logger()
◆ critical()
| void mb::Logger::critical |
( |
const std::string & |
origin, |
|
|
const std::string & |
message, |
|
|
const std::string & |
details = "", |
|
|
const json & |
data = json::object() |
|
) |
| |
|
static |
◆ debug()
| void mb::Logger::debug |
( |
const std::string & |
origin, |
|
|
const std::string & |
message, |
|
|
const std::string & |
details = "", |
|
|
const json & |
data = json::object() |
|
) |
| |
|
static |
◆ info()
| void mb::Logger::info |
( |
const std::string & |
origin, |
|
|
const std::string & |
message, |
|
|
const std::string & |
details = "", |
|
|
const json & |
data = json::object() |
|
) |
| |
|
static |
◆ initDb()
| void mb::Logger::initDb |
( |
const std::string & |
data_dir = "" | ) |
|
|
static |
Initialize database connection.
◆ logsDb()
Get the log database instance (for API access).
- Returns
- Pointer to LogDatabase instance, or nullptr if not initialized
◆ setLogLevel()
| void mb::Logger::setLogLevel |
( |
const LogLevel & |
level = LogLevel::INFO | ) |
|
|
static |
◆ trace()
| void mb::Logger::trace |
( |
const std::string & |
origin, |
|
|
const std::string & |
message, |
|
|
const std::string & |
details = "", |
|
|
const json & |
data = json::object() |
|
) |
| |
|
static |
◆ warn()
| void mb::Logger::warn |
( |
const std::string & |
origin, |
|
|
const std::string & |
message, |
|
|
const std::string & |
details = "", |
|
|
const json & |
data = json::object() |
|
) |
| |
|
static |
◆ isDbInitialized
| std::atomic<bool> mb::Logger::isDbInitialized = false |
|
inlinestatic |
The documentation for this class was generated from the following files:
- /home/runner/work/mantisbase/mantisbase/include/mantisbase/core/logger/logger.h
- /home/runner/work/mantisbase/mantisbase/src/core/logger/logger.cpp