17 #define LOG_WARN_ENABLED 1
19 #define LOG_INFO_ENABLED 1
21 #define LOG_DEBUG_ENABLED 1
23 #define LOG_TRACE_ENABLED 1
27 #define LOG_DEBUG_ENABLED 0
28 #define LOG_TRACE_ENABLED 0
77 #define KFATAL(message, ...) log_output(LOG_LEVEL_FATAL, message, ##__VA_ARGS__);
86 #define KERROR(message, ...) log_output(LOG_LEVEL_ERROR, message, ##__VA_ARGS__);
89 #if LOG_WARN_ENABLED == 1
96 #define KWARN(message, ...) log_output(LOG_LEVEL_WARN, message, ##__VA_ARGS__);
104 #define KWARN(message, ...)
107 #if LOG_INFO_ENABLED == 1
113 #define KINFO(message, ...) log_output(LOG_LEVEL_INFO, message, ##__VA_ARGS__);
121 #define KINFO(message, ...)
124 #if LOG_DEBUG_ENABLED == 1
130 #define KDEBUG(message, ...) log_output(LOG_LEVEL_DEBUG, message, ##__VA_ARGS__);
138 #define KDEBUG(message, ...)
141 #if LOG_TRACE_ENABLED == 1
147 #define KTRACE(message, ...) log_output(LOG_LEVEL_TRACE, message, ##__VA_ARGS__);
155 #define KTRACE(message, ...)
This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:177
_Bool b8
8-bit boolean type
Definition: defines.h:58
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
KAPI void log_output(log_level level, const char *message,...)
Outputs logging at the given level.
log_level
Represents levels of logging.
Definition: logger.h:32
@ LOG_LEVEL_DEBUG
Debug log level, should be used for debugging purposes.
Definition: logger.h:42
@ LOG_LEVEL_ERROR
Error log level, should be used to indicate critical runtime problems that cause the application to r...
Definition: logger.h:36
@ LOG_LEVEL_FATAL
Fatal log level, should be used to stop the application when hit.
Definition: logger.h:34
@ LOG_LEVEL_TRACE
Trace log level, should be used for verbose debugging purposes.
Definition: logger.h:44
@ LOG_LEVEL_WARN
Warning log level, should be used to indicate non-critial problems with the application that cause it...
Definition: logger.h:38
@ LOG_LEVEL_INFO
Info log level, should be used for non-erronuous informational purposes.
Definition: logger.h:40
void logging_shutdown(void *state)
Shuts down the logging system.
b8 logging_initialize(u64 *memory_requirement, void *state, void *config)
Initializes logging system. Call twice; once with state = 0 to get required memory size,...