diff options
Diffstat (limited to 'src/common/logging/backend.cpp')
| -rw-r--r-- | src/common/logging/backend.cpp | 3 |
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 @@ | |||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | #include <array> | 6 | #include <array> |
| 7 | #include <chrono> | 7 | #include <chrono> |
| 8 | #include <climits> | ||
| 8 | #include <condition_variable> | 9 | #include <condition_variable> |
| 9 | #include <memory> | 10 | #include <memory> |
| 10 | #include <thread> | 11 | #include <thread> |
| @@ -94,7 +95,7 @@ private: | |||
| 94 | } | 95 | } |
| 95 | // Drain the logging queue. Only writes out up to MAX_LOGS_TO_WRITE to prevent a case | 96 | // Drain the logging queue. Only writes out up to MAX_LOGS_TO_WRITE to prevent a case |
| 96 | // where a system is repeatedly spamming logs even on close. | 97 | // where a system is repeatedly spamming logs even on close. |
| 97 | constexpr int MAX_LOGS_TO_WRITE = 100; | 98 | const int MAX_LOGS_TO_WRITE = filter.IsDebug() ? INT_MAX : 100; |
| 98 | int logs_written = 0; | 99 | int logs_written = 0; |
| 99 | while (logs_written++ < MAX_LOGS_TO_WRITE && message_queue.Pop(entry)) { | 100 | while (logs_written++ < MAX_LOGS_TO_WRITE && message_queue.Pop(entry)) { |
| 100 | write_logs(entry); | 101 | write_logs(entry); |