aboutsummaryrefslogtreecommitdiffstats
path: root/core/logging.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-16 22:15:03 -0800
committerChris Robinson <[email protected]>2023-01-16 22:15:03 -0800
commitbb751ebc4421789219cb05ca8afa4203fb1d1ed7 (patch)
tree571d1acba76fe32da879138a11e749b7fd770b9f /core/logging.cpp
parent3d00147b99d4996f322ff231a7e0e7d9aff86f60 (diff)
Fix debug logging on Windows non-release buuilds
And skip logging for appropriate log levels on Windows release builds.
Diffstat (limited to 'core/logging.cpp')
-rw-r--r--core/logging.cpp6
1 files changed, 1 insertions, 5 deletions
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.