summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/log.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index ea39b98..55dcad5 100644
--- a/src/log.c
+++ b/src/log.c
@@ -17,7 +17,12 @@ void al_set_print(s32 (*print_func)(void *, u8, char *), void *userdata)
_al_log_userdata = userdata;
}
-static const char *levels[] = { "info", "warn", "error", "debug" };
+static const char *levels[] = {
+ [AL_LOG_INFO] = "info",
+ [AL_LOG_WARN] = "warn",
+ [AL_LOG_ERROR] = "error",
+ [AL_LOG_DEBUG] = "debug"
+};
#ifndef AL_LOG_SKIP
static __thread char messagebuf[AL_LOG_MESSAGE_SIZE];