logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milind Rao" <mili...@bellsouth.net>
Subject Re: How to detect duplicate messages in log4j
Date Wed, 17 Dec 2003 13:06:20 GMT
>The problem is how to determine if a message is a duplicate?
>Is there any API that lets me read all the events that have occurred in last
>30 seconds, whereby I can do the comparison and leave out stack trace of
>duplicate messages.

One way would be to create your own Log class which has a unique identifier (whatever you
will use to check for 
uniqueness) and log that instead of a string.  Your appender can then keep a set of logs that
you can check against when 
a new log is appended.


To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org

View raw message