You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Carlos Terron Bueno <ct...@alienvault.com> on 2017/12/13 17:18:05 UTC

log4j reduction of repeated message

rsyslog has an option, $RepeatedMsgReduction<http://www.rsyslog.com/doc/rsconf1_repeatedmsgreduction.html> tha can be used to reduce the number of log messages in a system. This option groups the same messages, printing the message in the record and then a line with the number of times it has been repeated.

Is it possible to do the same thing with log4j?

Thanks

Carlos

Re: log4j reduction of repeated message

Posted by Remko Popma <re...@gmail.com>.
I believe this is possible, but it’s not trivial. See the discussion here: https://issues.apache.org/jira/browse/LOG4J2-1630

(Shameless plug) Every java main() method deserves http://picocli.info

> On Dec 14, 2017, at 2:18, Carlos Terron Bueno <ct...@alienvault.com> wrote:
> 
> rsyslog has an option, $RepeatedMsgReduction<http://www.rsyslog.com/doc/rsconf1_repeatedmsgreduction.html> tha can be used to reduce the number of log messages in a system. This option groups the same messages, printing the message in the record and then a line with the number of times it has been repeated.
> 
> Is it possible to do the same thing with log4j?
> 
> Thanks
> 
> Carlos