Class LoggerLevelRangeFilter

Description

This is a very simple filter based on level matching, which can be used to reject messages with priorities outside a certain range.

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 LOG4PHP_LOGGER_FILTER_DENY is returned.

If the Logging event level is within the specified range, then if AcceptOnMatch is true, LOG4PHP_LOGGER_FILTER_ACCEPT is returned, and if AcceptOnMatch is false, LOG4PHP_LOGGER_FILTER_NEUTRAL is returned.

If LevelMin is not defined, then there is no minimum acceptable level (ie 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 beeing too "high"/important).

Refer to the LoggerAppenderSkeleton::setThreshold() method available to all appenders extending LoggerAppenderSkeleton for a more convenient way to filter out events by level.

  • version: $Revision: 1.1 $
  • since: 0.6
  • author: VxR <mailto:vxr@vxr.it>
  • log4j-author: based on code by Ceki G&uuml;lc&uuml;
  • log4j-author: Simon Kitching
  • log4j-class: org.apache.log4j.varia.LevelRangeFilter

Located in Program_Root/log4php/varia/LoggerLevelRangeFilter.php (line 67)

LoggerFilter
   |
   --LoggerLevelRangeFilter
Variable Summary
Method Summary
integer decide (LoggerLoggingEvent $event)
boolean getAcceptOnMatch ()
void setAcceptOnMatch (boolean $acceptOnMatch)
void setLevelMax (string $l)
void setLevelMin (string $l)
Variables
boolean $acceptOnMatch = true (line 72)
LoggerLevel $levelMax (line 82)
LoggerLevel $levelMin (line 77)

Inherited Variables

Inherited from LoggerFilter

LoggerFilter::$next
Methods
decide (line 138)

Return the decision of this filter.

Return the decision of this filter.

integer decide (LoggerLoggingEvent $event)

Redefinition of:
LoggerFilter::decide()
Decide what to do.
getAcceptOnMatch (line 87)
boolean getAcceptOnMatch ()
getLevelMax (line 119)
LoggerLevel getLevelMax ()
getLevelMin (line 103)
LoggerLevel getLevelMin ()
setAcceptOnMatch (line 95)
void setAcceptOnMatch (boolean $acceptOnMatch)
  • boolean $acceptOnMatch
setLevelMax (line 127)
void setLevelMax (string $l)
  • string $l: the level max to match
setLevelMin (line 111)
void setLevelMin (string $l)
  • string $l: the level min to match

Inherited Methods

Inherited From LoggerFilter

LoggerFilter::activateOptions()
LoggerFilter::decide()

Documentation generated on Mon, 15 Sep 2003 21:12:59 +0200 by phpDocumentor 1.2.2