log4j reduction of repeated message

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

log4j reduction of repeated message

Carlos Terron Bueno
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
Reply | Threaded
Open this post in threaded view
|

Re: log4j reduction of repeated message

Remko Popma-2
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 <[hidden email]> 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