21 static void init(
const std::string& level_str);
22 static void log(
LogLevel level,
const char* file,
int line,
const std::string& msg);
26 static std::mutex log_mutex;
27 static std::string level_to_string(
LogLevel level);
32#define LOG_DEBUG(msg) do { if (utils::Logger::current_level <= utils::LogLevel::DEBUG) { std::ostringstream oss; oss << msg; utils::Logger::log(utils::LogLevel::DEBUG, __FILE__, __LINE__, oss.str()); } } while(0)
33#define LOG_INFO(msg) do { if (utils::Logger::current_level <= utils::LogLevel::INFO) { std::ostringstream oss; oss << msg; utils::Logger::log(utils::LogLevel::INFO, __FILE__, __LINE__, oss.str()); } } while(0)
34#define LOG_WARN(msg) do { if (utils::Logger::current_level <= utils::LogLevel::WARN) { std::ostringstream oss; oss << msg; utils::Logger::log(utils::LogLevel::WARN, __FILE__, __LINE__, oss.str()); } } while(0)
35#define LOG_ERROR(msg) do { if (utils::Logger::current_level <= utils::LogLevel::ERROR) { std::ostringstream oss; oss << msg; utils::Logger::log(utils::LogLevel::ERROR, __FILE__, __LINE__, oss.str()); } } while(0)
static LogLevel current_level
Definition Logger.hpp:24
static void init(const std::string &level_str)
Definition Logger.cpp:10
static void log(LogLevel level, const char *file, int line, const std::string &msg)
Definition Logger.cpp:27
Definition CaseInsensitive.hpp:7
LogLevel
Definition Logger.hpp:12