Hi,
Rainer Gerhards wrote:
>>> Did you send a different message?
>>
>> First I run syslog_caller without modifications, so the messages are
>> different due to the used $i variable.
>>
>> But I also changed
>>
>> syslog(sev % 8, "test message nbr %d, severity=%d", i, sev % 8);
>>
>> into
>>
>> syslog(sev % 8, "test message nbr");
>>
>> The changed message was reduced (only one message was logged to disk),
>> but as said, there was no "last message repeated N times" message I also
>> expected to see.
>>
>>
>
> Yeah, I meant if you send one different message to /dev/log after that
> test. Because a message that's different is (traditionally) the trigger to
> output that "last message repeated n times" message. If it is always the
> same, it keeps counting.
Yup.
rsyslog is v7.6.3.
# cat /etc/rsyslog.conf
module(load="imuxsock")
$RepeatedMsgReduction on
module(
load="builtin:omfile"
Template="RSYSLOG_TraditionalFileFormat"
FileCreateMode="0644"
DirCreateMode="0755"
)
*.* action(
type="omfile"
File="/var/log/test.log"
FileOwner="root"
FileGroup="adm"
)
# date
Fri May 9 10:06:40 CEST 2014
# ./syslog_caller -m 20
# logger -p local0.info -t testApp foo
# cat /var/log/test.log
May 9 10:06:46 vm-gentoo-x64 rsyslogd: [origin software="rsyslogd"
swVersion="7.6.3" x-pid="30739" x-info="http://www.rsyslog.com"] exiting
on signal 15.
May 9 10:06:46 vm-gentoo-x64 rsyslogd: [origin software="rsyslogd"
swVersion="7.6.3" x-pid="30818" x-info="http://www.rsyslog.com"] start
May 9 10:06:54 vm-gentoo-x64 syslog_caller: test message nbr
May 9 10:06:59 vm-gentoo-x64 testApp: foo
No "last message repeated n times" message...
-Thomas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.