Class for logging.
More...
#include <Logger.hpp>
|
static void | init () |
|
template<typename Func > |
static void | logExecutionTime (const std::string &message, Func &&func) |
|
static void | log (const std::string &message, const LogLevel &logLevel) |
|
Class for logging.
Definition at line 28 of file Logger.hpp.
◆ ColorIndex
Enumerator |
---|
COLOR_ERROR | |
COLOR_INFO | |
COLOR_WARNING | |
COLOR_RESET | |
Definition at line 58 of file Logger.hpp.
◆ Logger() [1/3]
utl::Logger::Logger |
( |
const Logger & | | ) |
|
|
delete |
◆ Logger() [2/3]
utl::Logger::Logger |
( |
Logger && | | ) |
|
|
delete |
◆ Logger() [3/3]
◆ ~Logger()
◆ formatLogMessage()
static std::string utl::Logger::formatLogMessage |
( |
LogLevel | level, |
|
|
const std::string & | message ) |
|
inlinestaticnodiscardprivate |
◆ getColorForDuration()
static const char * utl::Logger::getColorForDuration |
( |
const float | duration | ) |
|
|
inlinestaticnodiscardprivate |
◆ init()
void utl::Logger::init |
( |
| ) |
|
|
static |
◆ log()
static void utl::Logger::log |
( |
const std::string & | message, |
|
|
const LogLevel & | logLevel ) |
|
inlinestatic |
Definition at line 51 of file Logger.hpp.
References COLOR_INFO, COLOR_RESET, COLOR_WARNING, formatLogMessage(), utl::INFO, and LOG_LEVEL_COLOR.
Referenced by cli::Client::Client(), utl::PluginLoader::loadPlugin(), main(), main(), cli::ArgsHandler::ParseArgs(), srv::ArgsHandler::ParseArgs(), and srv::Server::Server().
◆ logExecutionTime()
template<typename Func >
static void utl::Logger::logExecutionTime |
( |
const std::string & | message, |
|
|
Func && | func ) |
|
inlinestatic |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ LOG_LEVEL_COLOR
std::array<const char *, 4> utl::Logger::LOG_LEVEL_COLOR |
|
staticconstexprprivate |
◆ LOG_LEVEL_STRING
std::array<const char *, 2> utl::Logger::LOG_LEVEL_STRING = {"INFO", "WARNING"} |
|
staticconstexprprivate |
The documentation for this class was generated from the following files:
- /home/runner/work/R-Type/R-Type/modules/Utils/include/Utils/Logger.hpp
- /home/runner/work/R-Type/R-Type/modules/Utils/src/logger.cpp