diff options
| author | 2025-02-04 20:57:49 -0500 | |
|---|---|---|
| committer | 2025-02-04 20:57:49 -0500 | |
| commit | 5f80381cc8d2875d27d14288b6f11c31a72fb3cf (patch) | |
| tree | 228aa03fe1a01bf8a55e2dc4a824e97492a0477f | |
| parent | e648d5ff284122b5a3dfcad506878ad6c4bccc34 (diff) | |
| download | libalabaster-5f80381cc8d2875d27d14288b6f11c31a72fb3cf.tar.gz libalabaster-5f80381cc8d2875d27d14288b6f11c31a72fb3cf.tar.bz2 libalabaster-5f80381cc8d2875d27d14288b6f11c31a72fb3cf.zip | |
log: Specify explicit index for level strings
Signed-off-by: Andrew Opalach <andrew@akon.city>
| -rw-r--r-- | src/log.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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]; |