Class LoggerFilterLevelRange
This is a very simple filter based on level matching, which can be used to reject messages with priorities outside a certain range.
The filter admits three options LevelMin, LevelMax and AcceptOnMatch.
If the level of the LoggerLoggingEvent is not between Min and Max
(inclusive), then LoggerFilter::DENY is returned.
If the Logging event level is within the specified range, then if AcceptOnMatch is true, LoggerFilter::ACCEPT is returned, and if AcceptOnMatch is false, LoggerFilter::NEUTRAL is returned.
If LevelMin is not defined, then there is no minimum acceptable level (i.e. a level is never rejected for being too "low"/unimportant). If LevelMax is not defined, then there is no maximum acceptable level (ie a level is never rejected for being too "high"/important).
Refer to the LoggerAppender::setThreshold() method
available to all appenders extending LoggerAppender
for a more convenient way to filter out events by level.
<
p> An example for this filter:
{@example ../../examples/php/filter_levelrange.php 19}
<
p> The corresponding XML file:
{@example ../../examples/resources/filter_levelrange.xml 18}
- LoggerConfigurable
-
LoggerFilter
-
LoggerFilterLevelRange
Author: Simon Kitching
Author: based on the org.apache.log4j.varia.LevelRangeFilte Java code by Ceki Gülcü
Version: $Revision: 1213283 $
Since: 0.6
Located at core/log4php/filters/LoggerFilterLevelRange.php
public
|
|
public
|
|
public
|
|
public
integer
|
activateOptions(),
addNext(),
getNext()
|
setBoolean(),
setFileSize(),
setInteger(),
setLevel(),
setNumeric(),
setPositiveInteger(),
setString(),
warn()
|
ACCEPT,
DENY,
NEUTRAL
|
protected
boolean
|
$acceptOnMatch
|
#
true
|
protected
|
$levelMin
|
|
protected
|
$levelMax
|
$next
|