17 #define LOG_WARN_ENABLED 1
19 #define LOG_INFO_ENABLED 1
23 #define LOG_DEBUG_ENABLED 0
24 #define LOG_TRACE_ENABLED 0
27 #define LOG_DEBUG_ENABLED 1
29 #define LOG_TRACE_ENABLED 1
75 #define KFATAL(message, ...) _log_output(LOG_LEVEL_FATAL, message, ##__VA_ARGS__);
84 #define KERROR(message, ...) _log_output(LOG_LEVEL_ERROR, message, ##__VA_ARGS__);
87 #if LOG_WARN_ENABLED == 1
94 #define KWARN(message, ...) _log_output(LOG_LEVEL_WARN, message, ##__VA_ARGS__);
102 #define KWARN(message, ...)
105 #if LOG_INFO_ENABLED == 1
111 #define KINFO(message, ...) _log_output(LOG_LEVEL_INFO, message, ##__VA_ARGS__);
119 #define KINFO(message, ...)
122 #if LOG_DEBUG_ENABLED == 1
128 #define KDEBUG(message, ...) _log_output(LOG_LEVEL_DEBUG, message, ##__VA_ARGS__);
136 #define KDEBUG(message, ...)
139 #if LOG_TRACE_ENABLED == 1
145 #define KTRACE(message, ...) _log_output(LOG_LEVEL_TRACE, message, ##__VA_ARGS__);
153 #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:205
KAPI void _log_output(log_level level, const char *message,...)
Outputs logging at the given level. NOTE: This should not be called directly.
void(* PFN_console_write)(log_level level, const char *message)
Definition: logger.h:49
KAPI void logger_console_write_hook_set(PFN_console_write hook)
Provides a hook to a console (perhaps from Kohi Runtime or elsewhere) that the logging system can for...
log_level
Represents levels of logging.
Definition: logger.h:33
@ LOG_LEVEL_DEBUG
Debug log level, should be used for debugging purposes.
Definition: logger.h:43
@ LOG_LEVEL_ERROR
Error log level, should be used to indicate critical runtime problems that cause the application to r...
Definition: logger.h:37
@ LOG_LEVEL_FATAL
Fatal log level, should be used to stop the application when hit.
Definition: logger.h:35
@ LOG_LEVEL_TRACE
Trace log level, should be used for verbose debugging purposes.
Definition: logger.h:45
@ LOG_LEVEL_WARN
Warning log level, should be used to indicate non-critial problems with the application that cause it...
Definition: logger.h:39
@ LOG_LEVEL_INFO
Info log level, should be used for non-erronuous informational purposes.
Definition: logger.h:41