ASGE
3.2.0
Simple Game Framework in GL
|
Classes | |
struct | EnumHasher |
class | LoggerFactory |
class | LoggerBase |
class | StdOutLogger |
class | FileLogger |
Typedefs | |
using | LoggingConfig_t = std::unordered_map< std::string, std::string > |
using | LoggerCreator = LoggerBase *(*)(const LoggingConfig_t &) |
Enumerations | |
enum class | LogLevel : uint8_t { TRACE = 0 , DEBUG = 1 , INFO = 2 , WARN = 3 , ERRORS = 4 , NONE = 5 } |
Functions | |
std::string | timestamp () |
LoggerFactory & | getFactory () |
bool | RegisterLogger (const std::string &name, LoggerCreator function_ptr) |
LoggerBase & | getLogger (const LoggingConfig_t &config={ { "type", "std_out" }, { "color", "" } }) |
void | configure (const LoggingConfig_t &config) |
bool | logable (LogLevel level) |
void | log (const std::string &message, const LogLevel level) |
void | log (const std::string &message) |
void | TRACE (const std::string &message) |
void | INFO (const std::string &message) |
void | DEBUG (const std::string &message) |
void | WARN (const std::string &message) |
void | ERRORS (const std::string &message) |
Variables | |
constexpr LogLevel | LOG_LEVEL_CUTOFF = LogLevel::INFO |
const bool | logger_registered |
const bool | std_out_logger_registered |
const bool | file_logger_registered |
Use to log messages.
The universal logging system and its functionality resides here
|
strong |
The logging level to use This will filter out any messages below the current log level
Enumerator | |
---|---|
DEBUG | Enum value TRACE. |
INFO | Enum value DEBUG. |
WARN | Enum value INFO. |
ERRORS | Enum value WARN. |
NONE | Enum value ERRORS. |
Definition at line 57 of file Logger.hpp.
|
inline |
Logs the message for debug use
message |
Definition at line 314 of file Logger.hpp.
|
inline |
Logs the message at ERROR level
message |
Definition at line 338 of file Logger.hpp.
|
inline |
Logs the message as informational
message |
Definition at line 302 of file Logger.hpp.
|
inline |
statically log manually without a level or maybe with a custom one
message |
Definition at line 281 of file Logger.hpp.
|
inline |
statically log manually without the macros below
message | |
level |
Definition at line 274 of file Logger.hpp.
|
inline |
checks to see if log level threshold is met
level | the requested log level |
Definition at line 266 of file Logger.hpp.
|
inline |
Creates a timestamp using GMT.
Definition at line 94 of file Logger.hpp.
|
inline |
logs the message at TRACE level
message |
Definition at line 290 of file Logger.hpp.
|
inline |
Logs the message as a warning
message |
Definition at line 326 of file Logger.hpp.
const bool Logging::file_logger_registered |
registers the file logger
Definition at line 364 of file Logger.hpp.
const bool Logging::logger_registered |
registers the null logger
Definition at line 348 of file Logger.hpp.
const bool Logging::std_out_logger_registered |
registers the std out logger
Definition at line 356 of file Logger.hpp.