From 81a7b4ba322aeddf52207fdcd2213e5f5a493471 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 7 Sep 2026 12:56:00 -0400 Subject: log: Use AL_LOG_ENABLE_DEBUG Separate enabling debug logs from just AL_DEBUG. Signed-off-by: Andrew Opalach --- include/al/log.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/al') 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 #include +#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__) -- cgit v1.2.3-101-g0448