From 497b81558e2543f3b42e4267d8ea9acc40bdf03b Mon Sep 17 00:00:00 2001 From: James Rowe Date: Sat, 14 Jul 2018 12:47:14 -0600 Subject: Logging: Dump all logs in the queue on close in debug mode --- src/common/logging/backend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common/logging/backend.cpp') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3