9#define LOG_WARN_ENABLED 1
10#define LOG_INFO_ENABLED 1
11#define LOG_DEBUG_ENABLED 1
12#define LOG_TRACE_ENABLED 1
15#define LOG_DEBUG_ENABLED 0
16#define LOG_TRACE_ENABLED 0
60#define SFATAL(message, ...) logOutput(Saga::LogLevel::FATAL, message, ##__VA_ARGS__)
68#define SERROR(message, ...) logOutput(Saga::LogLevel::ERROR, message, ##__VA_ARGS__)
71#if LOG_WARN_ENABLED == 1
77#define SWARN(message, ...) logOutput(Saga::LogLevel::WARN, message, ##__VA_ARGS__)
80#define SWARN(message, ...)
83#if LOG_INFO_ENABLED == 1
89#define SINFO(message, ...) logOutput(Saga::LogLevel::INFO, message, ##__VA_ARGS__)
92#define SINFO(message, ...)
95#if LOG_DEBUG_ENABLED == 1
101#define SDEBUG(message, ...) logOutput(Saga::LogLevel::DEBUG, message, ##__VA_ARGS__)
104#define SDEBUG(message, ...)
107#if LOG_TRACE_ENABLED == 1
113#define STRACE(message, ...) logOutput(Saga::LogLevel::TRACE, message, ##__VA_ARGS__)
116#define STRACE(message, ...)
void shutDownLogger()
Shut down the logger, and flush any buffered output.
Definition: logger.cpp:30
LogLevel
Define multiple levels of logging. Fatal and Error are always enabled, and debug and traced are left ...
Definition: logger.h:23
@ INFO
Generally useful information to log, like successful initialization or completion of significant task...
Definition: logger.h:27
@ ERROR
Reserved for anything that will cause the application to crash, or create undefined behaviour....
Definition: logger.h:25
@ WARN
Anything that can cause oddities with the application's execution. This might or might not result in ...
Definition: logger.h:26
@ DEBUG
Fine-grained information events that is useful to debug the application.
Definition: logger.h:28
@ FATAL
Reserved for anything that would cause the core engine to crash. This should force a shutdown to prev...
Definition: logger.h:24
@ TRACE
Finer-grained information, typically targetted towards one part of the application.
Definition: logger.h:29
void logOutput(LogLevel level, const char *message,...)
Log an output.
Definition: logger.cpp:37
bool initializeLogger()
Initialize the logger. Neccessary to call before any logging.
Definition: logger.cpp:24