Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
|
The file containing the logic for the logger. More...
Functions | |
std::string | replaceMinecraftEscapes (const std::string &s) |
void | logAtLevel (LogLevel level, std::string format, va_list args) |
Logs a format and its args at a certain level. | |
Variables | |
LogLevel | LOGLEVEL |
The current stored loglevel. | |
const std::unordered_map< LogLevel, std::pair< std::string, std::string > > | LEVELS |
Mappings for loglevel enum. | |
const std::unordered_map< char, std::string > | NOTCHIAN_TO_ANSI |
The file containing the logic for the logger.
void logAtLevel | ( | LogLevel | level, |
std::string | format, | ||
va_list | args ) |
Logs a format and its args at a certain level.
level | the level to log to |
format | the format of the log |
args | the arguments of the log |
const std::unordered_map<LogLevel, std::pair<std::string, std::string> > LEVELS |
Mappings for loglevel enum.
For ease of use, instead of having a giant switch case, we have this map. The first part of the pair in the values is the string representation of the level and the second one is the color associated with that same level.
const std::unordered_map<char, std::string> NOTCHIAN_TO_ANSI |