Filters |
When to Use the StringMatchFilter |
Use StringMatchFilter when you want to filter messages based on a string in the log event message.
To use this filter you specify a character string, and you specify whether to accept or deny the log event if the filter character string matches a character string in the log event message. If there is no match, the filtering process continues with the next filter in the filtering policy. If there are no other filters in the filtering policy and if the log event has not been denied, the appender accepts and processes the log event.
StringMatchFilter Syntax |
<filter class="StringMatchFilter">
|
</filter> |
StringMatchFilter Syntax Description |
specifies the string to search for in the log event message.
specifies whether to accept or deny the log event when the log event message contains character-string. Valid values are TRUE or FALSE:
TRUE |
specifies to accept the log event. |
FALSE |
specifies to deny the log event. |
StringMatchFilter Example |
The following filter definition does not accept log events that contain the string "RETURN":
<filter class="StringMatchFilter"> <param name="StringToMatch" value="RETURN"/> <param name="AcceptOnMatch" value="false"/> </filter>
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.