Log every 100th repeated line

This commit is contained in:
mailwl 2017-03-01 11:42:16 +03:00
parent d267880198
commit 5316b0905f

View File

@ -151,6 +151,10 @@ void LogMessage(Class log_class, Level log_level, const char* filename, unsigned
if (entry == prev_entry) { if (entry == prev_entry) {
prev_entry.count++; prev_entry.count++;
prev_entry.timestamp = entry.timestamp; prev_entry.timestamp = entry.timestamp;
if (prev_entry.count == 100) {
PrintColoredMessage(prev_entry);
prev_entry.count = 0;
}
return; return;
} }
if (prev_entry.count != 0) if (prev_entry.count != 0)