summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-09-07 12:56:00 -0400
committerAndrew Opalach <andrew@akon.city> 2026-09-07 12:56:00 -0400
commit81a7b4ba322aeddf52207fdcd2213e5f5a493471 (patch)
treeb9e168cd3bdad7da17bb969d880c1223927937b3 /include
parent98de33b1f74a381f442773f1cc73d1b07288bee1 (diff)
downloadlibalabaster-81a7b4ba322aeddf52207fdcd2213e5f5a493471.tar.gz
libalabaster-81a7b4ba322aeddf52207fdcd2213e5f5a493471.tar.bz2
libalabaster-81a7b4ba322aeddf52207fdcd2213e5f5a493471.zip
log: Use AL_LOG_ENABLE_DEBUG
Separate enabling debug logs from just AL_DEBUG. Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'include')
-rw-r--r--include/al/log.h6
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__)