Trace Engine
A Raycaster Engine in C
Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
1#ifndef _H_LOG
2#define _H_LOG
3
11#ifndef GAME_EXPORT
12 #define log_debug(...) (log_message(_LOG_LEVEL_DEBUG, __FILE__, __LINE__, __VA_ARGS__))
13 #define log_info(...) (log_message(_LOG_LEVEL_INFO, __FILE__, __LINE__, __VA_ARGS__))
14#else
15 #define log_debug(...) // Does nothing
16 #define log_info(...) // Does nothing
17#endif
18
19#define log_warning(...) (log_message(_LOG_LEVEL_WARNING, __FILE__, __LINE__, __VA_ARGS__))
20#define log_error(...) (log_message(_LOG_LEVEL_ERROR, __FILE__, __LINE__, __VA_ARGS__))
21
30
39void log_message(const log_levels_t log_level, const char* file_name, const int line, const char* message, ...);
40
41#endif
void log_message(const log_levels_t log_level, const char *file_name, const int line, const char *message,...)
Definition log.c:42
log_levels_t
Definition log.h:24
@ _LOG_LEVEL_WARNING
Definition log.h:27
@ _LOG_LEVEL_ERROR
Definition log.h:28
@ _LOG_LEVEL_DEBUG
Definition log.h:25
@ _LOG_LEVEL_INFO
Definition log.h:26