From bb751ebc4421789219cb05ca8afa4203fb1d1ed7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 16 Jan 2023 22:15:03 -0800 Subject: Fix debug logging on Windows non-release buuilds And skip logging for appropriate log levels on Windows release builds. --- core/logging.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'core/logging.cpp') diff --git a/core/logging.cpp b/core/logging.cpp index 69cb92b5..ec53e5f6 100644 --- a/core/logging.cpp +++ b/core/logging.cpp @@ -21,10 +21,6 @@ void al_print(LogLevel level, FILE *logfile, const char *fmt, ...) { -#if (defined(_WIN32) && defined(NDEBUG)) || !defined(__ANDROID__) - if(gLogLevel < level) [[likely]] - return; -#endif /* Kind of ugly since string literals are const char arrays with a size * that includes the null terminator, which we want to exclude from the * span. @@ -67,7 +63,7 @@ void al_print(LogLevel level, FILE *logfile, const char *fmt, ...) fputs(str, logfile); fflush(logfile); } -#if defined(_WIN32) && defined(NDEBUG) +#if defined(_WIN32) && !defined(NDEBUG) /* OutputDebugStringW has no 'level' property to distinguish between * informational, warning, or error debug messages. So only print them for * non-Release builds. -- cgit v1.2.3