summaryrefslogtreecommitdiffstats
path: root/src/common/logging/backend.cpp
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2018-07-14 20:47:14 +0200
committerJames Rowe <jroweboy@gmail.com>2018-07-15 21:02:09 +0200
commit497b81558e2543f3b42e4267d8ea9acc40bdf03b (patch)
tree47654b29d6ddd302315de8ff5e0593ca8de9ef77 /src/common/logging/backend.cpp
parentLogging: Don't lock the queue for the duration of the write (diff)
downloadyuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.gz
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.bz2
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.lz
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.xz
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.zst
yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.zip
Diffstat (limited to '')
-rw-r--r--src/common/logging/backend.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 5313b8510..ed1e93cc2 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -5,6 +5,7 @@
#include <algorithm>
#include <array>
#include <chrono>
+#include <climits>
#include <condition_variable>
#include <memory>
#include <thread>
@@ -94,7 +95,7 @@ private:
}
// Drain the logging queue. Only writes out up to MAX_LOGS_TO_WRITE to prevent a case
// where a system is repeatedly spamming logs even on close.
- constexpr int MAX_LOGS_TO_WRITE = 100;
+ const int MAX_LOGS_TO_WRITE = filter.IsDebug() ? INT_MAX : 100;
int logs_written = 0;
while (logs_written++ < MAX_LOGS_TO_WRITE && message_queue.Pop(entry)) {
write_logs(entry);