diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/al/log.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/al/log.h b/include/al/log.h index 520306f..87eb9e0 100644 --- a/include/al/log.h +++ b/include/al/log.h @@ -6,6 +6,10 @@ #include <al/types.h> #include <al/lib.h> +#ifdef AL_DEBUG +#define AL_LOG_ENABLE_DEBUG +#endif + AL_IGNORE_WARNING("-Wunused-variable") #ifndef AL_LOG_SECTION static const char *AL_LOG_SECTION_NAME = ""; @@ -38,7 +42,7 @@ s32 _al_logv(u8 level, const char *section, const char *name, const s32 line, co #define log_info(fmt, ...) al_log(AL_LOG_INFO, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #define log_warn(fmt, ...) al_log(AL_LOG_WARN, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #define log_error(fmt, ...) al_log(AL_LOG_ERROR, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) -#if defined AL_DEBUG || defined AL_LOG_ENABLE_TRACE +#if defined AL_LOG_ENABLE_DEBUG || defined AL_LOG_ENABLE_TRACE #define log_debug(fmt, ...) al_log(AL_LOG_DEBUG, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #else #define log_debug(fmt, ...) al_log_nop(AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) |