Contact Us 1-800-596-4880

Wildcard Filter

Purpose: Matches string messages against a wildcard pattern.

Minimum Configuration: The pattern string for the match.

Discussion: The Wildcard Filter applies a wildcard pattern to the message payload. The filter applies the toString() method to the payload to convert the payload to a String. To ensure that the payload is a String, you might want to apply a Payload Filter to the message with a nested And Logic Filter.

By default, pattern matching is case sensitive, and the Case Sensitive box is checked. Uncheck this box if you do not want pattern matching to be case sensitive.

You might also want to apply a Payload Type Filter to the message using an AND Logic Filter to make sure the payload is a String.

For the string "the quick brown fox jumped over the lazy dog", the following patterns would match:

  • *x jumped over the lazy dog

  • the quick*

  • fox

<wildcard-filter pattern="the quick brown *"/>

The wildcard-filter only works with the following patterns: * prefix (.log) * suffix (java.util.) * or enclosing strings (util) as well as the deprecated payload based filter (java.lang.Throwable+) and regular strings.

In any other case you should use the Regex Filter instead.