Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
|
The logging namespace. More...
Classes | |
class | PostPrintEvent |
Post print event. More... | |
Functions | |
std::string | getTime () |
Get the Time as a string. | |
void | loadConfig () |
Loads the loglevel from the config. | |
void | debug (const char *format,...) |
Logs something at the DEBUG level. | |
void | info (const char *format,...) |
Logs something at the INFO level. | |
void | plugin (const char *format,...) |
Logs something at the PLUGIN level, for plugins. | |
void | warn (const char *format,...) |
Logs something at the WARN level. | |
void | error (const char *format,...) |
Logs something at the ERROR level. | |
void | fatal (const char *format,...) |
Logs something at the FATAL level. | |
The logging namespace.
The logging namespace, contains all of the logging-related functions.
Logs something at the DEBUG level.
In the end is just a wrapper around printf, so it will works like it. Should be used to log information only used by developers.
format | the format string to parse arguements in |
... | the arguments for the format |
Logs something at the ERROR level.
In the end is just a wrapper around printf, so it will works like it. Should only be used to logs errors to the end user, when the program has done / detected something wrong, that impacts the end user.
format | the format string to parse arguements in |
... | the arguments for the format |
Logs something at the FATAL level.
In the end is just a wrapper around printf, so it will works like it. Should only be used when a fatal error has happened, that crashes the program or has a severe impact for the well-being of the program.
format | the format string to parse arguements in |
... | the arguments for the format |
std::string logger::getTime | ( | ) |
Get the Time as a string.
Gets the local time and returns a string representation of the time accompanied by the date and the month. Used for the console logging.
Logs something at the INFO level.
In the end is just a wrapper around printf, so it will works like it. Should be used to print out general information such as the current status of the program and so on and so on.
format | the format string to parse arguements in |
... | the arguments for the format |
void logger::loadConfig | ( | ) |
Loads the loglevel from the config.
Loads the loglevel from the config and parse it to be usable, should only be used internally as a hook after the config was loaded, which is in Config::load().
Logs something at the PLUGIN level, for plugins.
In the end is just a wrapper around printf, so it will works like it. Should be used to print out general information such as the current status of the program and so on and so on.
format | the format string to parse arguments in |
... | the arguments for the format |
Logs something at the WARN level.
In the end is just a wrapper around printf, so it will works like it. Should be used to log information that the end user should be warned about, but has no impact.
format | the format string to parse arguments in |
... | the arguments for the format |