This is quite easy if you code yourself a little Filter class. An appender can be given a Filter, so create a Filter impl that takes the event, works out whether it's the type that's been trapped before, and return Filter.DENY if you don't want to see it.

The class should only be a handful of lines of code for you.

cheers,

Paul Smith

Steve Kuo wrote:

We're using a third party product (JGroups) which
instead of logging an error just once, keeps logging
the same error repeatedly. This is annoying as it
fills up the log file.

Is there a way to configure log4j to only log an error
so many times (for a particular logger instance)?
After the maximum error threshold is met, then ignore
all further errors.

Thanks, Steve

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





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



Reply via email to