Skip to content

WhenNotEqual filter

Rolf Kristensen edited this page Nov 27, 2021 · 4 revisions

Matches when the calculated layout is NOT equal to the specified substring. This filter is deprecated in favour of <when /> which is based on contitions.

Platforms Supported: All

Configuration Syntax

<rules>
  <logger ... >
    <filters>
      <whenNotEqual ignoreCase="Boolean" layout="Layout" action="Enum" compareTo="String"/>
    </filters>
  </logger>
</rules>

Parameters

Filtering Options

  • layout - Layout to be used to filter log messages. Layout Required.
  • action - Action to be taken when filter matches. Required.
    Possible values:
    • Ignore - The message should not be logged.
    • IgnoreFinal - The message should not be logged and processing should be finished.
    • Log - The message should be logged.
    • LogFinal - The message should be logged and processing should be finished.
    • Neutral - The filter doesn't want to decide whether to log or discard the message.
  • compareTo - String to compare the layout to. Required.
  • ignoreCase - Indicates whether to ignore case when comparing strings. Boolean Default: False
Clone this wiki locally