From 5316b0905feea4f974c1220fc66fb00b64ad9d99 Mon Sep 17 00:00:00 2001 From: mailwl Date: Wed, 1 Mar 2017 11:42:16 +0300 Subject: [PATCH] Log every 100th repeated line --- src/common/logging/backend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index e8d55bb96..c64858d9a 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -151,6 +151,10 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned if (entry == prev_entry) { prev_entry.count++; prev_entry.timestamp = entry.timestamp; + if (prev_entry.count == 100) { + PrintColoredMessage(prev_entry); + prev_entry.count = 0; + } return; } if (prev_entry.count != 0)