Bug 8326

Summary: syslogd: improve duplicate detection
Product: Busybox Reporter: Bernhard Breinbauer <bernhard>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: 1.24.x   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:
Attachments: syslog dup detection improvement

Description Bernhard Breinbauer 2015-09-04 09:11:26 UTC
The current implementation of ENABLE_FEATURE_SYSLOGD_DUP includes the timestamp into the comparison of current and previous log message. Therefore duplicates are only detected if they appear in the same second.

The following patch moves the detection into timestamp_and_log() where the timestamp has been removed and also adds a message how often a message was repeated.
Comment 1 Bernhard Breinbauer 2015-09-04 09:12:24 UTC
Created attachment 6151 [details]
syslog dup detection improvement
Comment 2 Denys Vlasenko 2015-09-15 19:01:27 UTC
(In reply to comment #0)
> The current implementation of ENABLE_FEATURE_SYSLOGD_DUP includes the timestamp
> into the comparison of current and previous log message. Therefore duplicates
> are only detected if they appear in the same second.

This is intended. If a message repeats *occasionally*, say, every 3 seconds, current code shows it. It suppresses the case when the same message repeats with high frequency.