diff options
author | Chris Robinson <[email protected]> | 2019-06-04 01:37:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-06-04 01:37:36 -0700 |
commit | 4522a51ea21813de9a59dd059c50f85d8a5116f1 (patch) | |
tree | dc41f36517a4ec6236c56b375eb37eadee8bf2e6 /Alc/logging.h | |
parent | f0bc9d8a9b45a86cf0736a3f118b28ae6fdb90f0 (diff) |
Don't log the function or prefix
It's ultimately unnecessary since the message is an indicator about where it
was logged from. The message itself is generally more important than where it
was from, too.
Diffstat (limited to 'Alc/logging.h')
-rw-r--r-- | Alc/logging.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Alc/logging.h b/Alc/logging.h index e709bbf2..b5faf698 100644 --- a/Alc/logging.h +++ b/Alc/logging.h @@ -15,19 +15,18 @@ extern FILE *gLogFile; -constexpr inline const char *CurrentPrefix() noexcept { return ""; } -#if defined(__GNUC__) && !defined(_WIN32) -#define AL_PRINT(T, MSG, ...) fprintf(gLogFile, "AL lib: %s %s%s: " MSG, T, CurrentPrefix(), __FUNCTION__ , ## __VA_ARGS__) +#if !defined(_WIN32) +#define AL_PRINT(T, ...) fprintf(gLogFile, "AL lib: " T " " __VA_ARGS__) #else -void al_print(const char *type, const char *prefix, const char *func, const char *fmt, ...) DECL_FORMAT(printf, 4,5); -#define AL_PRINT(T, ...) al_print((T), CurrentPrefix(), __FUNCTION__, __VA_ARGS__) +void al_print(const char *type, const char *fmt, ...) DECL_FORMAT(printf, 2,3); +#define AL_PRINT(T, ...) al_print((T), __VA_ARGS__) #endif #ifdef __ANDROID__ #include <android/log.h> -#define LOG_ANDROID(T, MSG, ...) __android_log_print(T, "openal", "AL lib: %s%s: " MSG, CurrentPrefix(), __FUNCTION__ , ## __VA_ARGS__) +#define LOG_ANDROID(T, ...) __android_log_print(T, "openal", "AL lib: " __VA_ARGS__) #else -#define LOG_ANDROID(T, MSG, ...) ((void)0) +#define LOG_ANDROID(T, ...) ((void)0) #endif enum LogLevel { |