#include <logger.h>
|
| | MbLogger (const MantisBase &app) |
| MbLogDatabase & | logsDb () const |
| | Get the log database instance (for API access).
|
| void | initDb (const std::string &data_dir="") const |
| | Initialize database connection.
|
| void | trace (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) const |
| void | info (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) const |
| void | debug (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) const |
| void | warn (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) const |
| void | critical (const std::string &origin, const std::string &message, const std::string &details="", const json &data=json::object()) const |
A wrapper class around the spdlog's logging functions. For more info, check docs here:
- See also
- https://github.com/gabime/spdlog
◆ MbLogger()
◆ critical()
| void mb::MbLogger::critical |
( |
const std::string & | origin, |
|
|
const std::string & | message, |
|
|
const std::string & | details = "", |
|
|
const json & | data = json::object() ) const |
◆ debug()
| void mb::MbLogger::debug |
( |
const std::string & | origin, |
|
|
const std::string & | message, |
|
|
const std::string & | details = "", |
|
|
const json & | data = json::object() ) const |
◆ info()
| void mb::MbLogger::info |
( |
const std::string & | origin, |
|
|
const std::string & | message, |
|
|
const std::string & | details = "", |
|
|
const json & | data = json::object() ) const |
◆ initDb()
| void mb::MbLogger::initDb |
( |
const std::string & | data_dir = "" | ) |
const |
Initialize database connection.
◆ logsDb()
Get the log database instance (for API access).
- Returns
- Pointer to MbLogDatabase instance, or nullptr if not initialized
◆ setLogLevel()
| void mb::MbLogger::setLogLevel |
( |
const MbLogLevel & | level = MbLogLevel::INFO | ) |
|
|
static |
◆ trace()
| void mb::MbLogger::trace |
( |
const std::string & | origin, |
|
|
const std::string & | message, |
|
|
const std::string & | details = "", |
|
|
const json & | data = json::object() ) const |
◆ warn()
| void mb::MbLogger::warn |
( |
const std::string & | origin, |
|
|
const std::string & | message, |
|
|
const std::string & | details = "", |
|
|
const json & | data = json::object() ) const |
◆ isDbInitialized
| std::atomic<bool> mb::MbLogger::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