log4j-user  

Re: How to detect duplicate messages in log4j

Milind Rao
Wed, 17 Dec 2003 06:27:35 -0800

>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.



Regards
Milind



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]