11#include <../../3rdParty/json/single_include/nlohmann/json.hpp>
12#include <../../3rdParty/spdlog/include/spdlog/spdlog.h>
13#include <../../3rdParty/spdlog/include/spdlog/sinks/basic_file_sink.h>
17 using json = nlohmann::json;
44 template <
typename... Args>
45 static void trace(fmt::format_string<Args...> msg, Args&&... args)
47 spdlog::trace(msg, std::forward<Args>(args)...);
50 template <
typename... Args>
51 static void info(fmt::format_string<Args...> msg, Args&&... args)
53 spdlog::info(msg, std::forward<Args>(args)...);
56 template <
typename... Args>
57 static void debug(fmt::format_string<Args...> msg, Args&&... args)
59 spdlog::debug(msg, std::forward<Args>(args)...);
62 template <
typename... Args>
63 static void warn(fmt::format_string<Args...> msg, Args&&... args)
65 spdlog::warn(msg, std::forward<Args>(args)...);
68 template <
typename... Args>
69 static void critical(fmt::format_string<Args...> msg, Args&&... args)
71 spdlog::critical(msg, std::forward<Args>(args)...);
94#define TRACE_CLASS_METHOD() mantis::FuncLogger _logger(std::format("{} {}::{}()", __file__, __class_name__, __func__));
95#define TRACE_METHOD mantis::FuncLogger _logger(std::format("{} {}()", __file__, __func__));
A class for tracing function execution [entry, exit] useful in following execution flow.
Definition logging.h:82
~FuncLogger()
Definition logging.cpp:60
static void warn(fmt::format_string< Args... > msg, Args &&... args)
Definition logging.h:63
static void trace(fmt::format_string< Args... > msg, Args &&... args)
Definition logging.h:45
static void setLogLevel(const LogLevel &level=LogLevel::INFO)
Definition logging.cpp:9
static void critical(fmt::format_string< Args... > msg, Args &&... args)
Definition logging.h:69
static void init()
Definition logging.cpp:42
static void info(fmt::format_string< Args... > msg, Args &&... args)
Definition logging.h:51
static void debug(fmt::format_string< Args... > msg, Args &&... args)
Definition logging.h:57
nlohmann::json json
Definition mantis.h:35
router.h
Definition app.h:31
LogLevel
Definition logging.h:23
@ WARN
Info Logging Level
@ INFO
Debug Logging Level
@ CRITICAL
Warning Logging Level
@ DEBUG
Trace logging level