Filters |
LevelRangeFilter Overview |
Use LevelRangeFilter when you want to filter log event messages whose message threshold falls within a range of message thresholds. The thresholds are, from lowest to highest: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. For example, if the minimum threshold is DEBUG and the maximum threshold is ERROR, and if AcceptOnMatch is TRUE, messages that have the thresholds TRACE and FATAL are filtered.
To use this filter you specify a minimum and a maximum threshold range to compare with the log event threshold. If there is no match, the log event is denied. If there is a match and if AcceptOnMatch is TRUE, the appender accepts and processes the log event. If there is a match and AcceptOnMatch is FALSE, the next filter in the filtering policy is processed. 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.
LevelRangeFilter Syntax |
<filter class="LevelRangeFilter">
|
</filter> |
LevelRangeFilter Syntax Description |
specifies to use the LevelRangeFilter
specifies the highest threshold that can be written to the appender.
specifies the lowest threshold that can be written to the appender.
specifies whether to accept the log event when the log event message threshold falls within the threshold range that is specified by the filter. Valid values are TRUE or FALSE:
TRUE |
specifies to accept the log event. |
FALSE |
specifies to pass the filtering process to the next filter in the filtering policy. If the log event has not been denied and there are no other filters in the filtering policy, the appender accepts and processes the log event. |
LevelRangeFilter Example |
The following filter accepts log events only if the log event threshold is between WARN and ERROR:
<filter class="LevelRangeFilter"> <param name="LevelMax" value="error"/> <param name="LevelMin" value="warn"/> <param name="AcceptOnMatch" value="true"/> </filter>
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.