diff options
author | Chris Robinson <[email protected]> | 2020-09-28 00:40:30 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-09-28 00:40:30 -0700 |
commit | da29489ead3ecfc269a220a22ee117d93bed23a6 (patch) | |
tree | 705498f9aaf0d5e71ca9590e477eb21642615e3c /alc/logging.h | |
parent | 39f4ea61c5978b7abca0ef79de0b207638e7175f (diff) |
Use an enum class for the log level
Diffstat (limited to 'alc/logging.h')
-rw-r--r-- | alc/logging.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/alc/logging.h b/alc/logging.h index 1077f08f..77593779 100644 --- a/alc/logging.h +++ b/alc/logging.h @@ -22,29 +22,29 @@ extern FILE *gLogFile; #define LOG_ANDROID(T, ...) ((void)0) #endif -enum LogLevel { - NoLog, - LogError, - LogWarning, - LogTrace, - LogRef +enum class LogLevel { + Disable, + Error, + Warning, + Trace, + Ref }; extern LogLevel gLogLevel; #define TRACE(...) do { \ - if UNLIKELY(gLogLevel >= LogTrace) \ + if UNLIKELY(gLogLevel >= LogLevel::Trace) \ AL_PRINT(gLogFile, "AL lib: (II) " __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_DEBUG, __VA_ARGS__); \ } while(0) #define WARN(...) do { \ - if UNLIKELY(gLogLevel >= LogWarning) \ + if UNLIKELY(gLogLevel >= LogLevel::Warning) \ AL_PRINT(gLogFile, "AL lib: (WW) " __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_WARN, __VA_ARGS__); \ } while(0) #define ERR(...) do { \ - if UNLIKELY(gLogLevel >= LogError) \ + if UNLIKELY(gLogLevel >= LogLevel::Error) \ AL_PRINT(gLogFile, "AL lib: (EE) " __VA_ARGS__); \ LOG_ANDROID(ANDROID_LOG_ERROR, __VA_ARGS__); \ } while(0) |