12#ifndef MINESERVER_LOGGER_H
13#define MINESERVER_LOGGER_H
20#ifdef MINESERVER_ANSI_COLORS
25#define RESET_COLOR "\033[0m"
31#define TIME_COLOR "\033[0;90m"
36#define FATAL_COLOR "\033[1;31m"
42#define ERROR_COLOR "\033[0;31m"
48#define WARN_COLOR "\033[0;33m"
54#define PLUGIN_COLOR "\033[0;34m"
60#define INFO_COLOR "\033[0;35m"
66#define DEBUG_COLOR "\033[0;36m"
73#define PLUGIN_COLOR ""
Event interface.
Definition event.h:28
Post print event.
Definition logger.h:249
The main file for the config io.
The header-only containing event logic.
constexpr std::string_view type_name()
Gets the name of the type paramater.
Definition event.h:56
LogLevel
The LogLevel used internally by the logger.
Definition logger.h:88
@ DEBUG
Debug level.
Definition logger.h:100
@ ERROR
Error level.
Definition logger.h:124
@ FATAL
Fatal level.
Definition logger.h:130
@ INFO
Info and.
Definition logger.h:106
@ WARN
warn level
Definition logger.h:118
@ OFF
Off level, just for disabling.
Definition logger.h:136
@ ALL
All level, just for enabling.
Definition logger.h:94
@ PLUGIN
Plugin level.
Definition logger.h:112
The logging namespace.
Definition logger.h:146
void plugin(const char *format,...)
Logs something at the PLUGIN level, for plugins.
Definition logger.cpp:180
void error(const char *format,...)
Logs something at the ERROR level.
Definition logger.cpp:196
void fatal(const char *format,...)
Logs something at the FATAL level.
Definition logger.cpp:204
std::string getTime()
Get the Time as a string.
Definition logger.cpp:22
void info(const char *format,...)
Logs something at the INFO level.
Definition logger.cpp:172
void loadConfig()
Loads the loglevel from the config.
Definition logger.cpp:31
void warn(const char *format,...)
Logs something at the WARN level.
Definition logger.cpp:188
void debug(const char *format,...)
Logs something at the DEBUG level.
Definition logger.cpp:164