Hi All,
I have a client that sends a heartbeat to the server every 30 seconds. If
the client is unable to connect to the server it prints the message along
with the stack trace. This failure may persist for a while and there is a
risk of filling up the log files. If I just note the failure, there is a
risk of not being able to fully diagnose a problem later on.

I want to detect repetitive error logging and instead log just a note
summarizing the failure *AFTER* the first error logging (with the failure
reported in its entirety).

To implement the above, I plan to create my own Appender that extends
RollingFileAppender and overwrites subAppend(LoggingEvent event) . For a
duplicate message create a new LoggingEvent with Throwable null else proceed
with original LoggingEvent.

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.

Regards,
Shubhra




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

Reply via email to