RepeatMatchFilter

Use RepeatMatchFilter to discard a message if the message has already been logged by the appender.

Syntax

<filter class="RepeatMatchFilter">
<param name="AcceptOnMatch" value="TRUE | FALSE"/>
</filter>

Syntax Description

name="AcceptOnMatch" value="TRUE | FALSE"
specifies whether to accept or deny the log event when the log event message is identical to the last message processed by the appender. Valid values are TRUE or FALSE:
TRUE
specifies to accept the log event.
FALSE
specifies to deny the log event.

Details

This filter compares only the last message processed by this appender with the current log event message.
As a best practice, you can use this filter as the first filter in appender filtering policies to discard repeated messages.

Example

The following filter definition does not accept log events if a log event message has already been logged by this appender:
<filter class="RepeatMatchFilter">
   <param name="AcceptOnMatch" value="FALSE"/>
</filter>