From 4522a51ea21813de9a59dd059c50f85d8a5116f1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 4 Jun 2019 01:37:36 -0700 Subject: 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. --- Alc/logging.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Alc/logging.h') 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 -#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 { -- cgit v1.2.3