Class LoggerLevelMatchFilter

Description

This is a very simple filter based on level matching.

The filter admits two options <var>LevelToMatch</var> and <var>AcceptOnMatch</var>. If there is an exact match between the value of the <var>LevelToMatch</var> option and the level of the LoggerLoggingEvent, then the decide() method returns LOG4PHP_LOGGER_FILTER_ACCEPT in case the <var>AcceptOnMatch</var> option value is set to true, if it is false then LOG4PHP_LOGGER_FILTER_DENY is returned. If there is no match, LOG4PHP_LOGGER_FILTER_NEUTRAL is returned.

  • author: Marco Vassura
  • version: $Revision: 556784 $
  • since: 0.6

Located in /varia/LoggerLevelMatchFilter.php (line 41)

LoggerFilter
   |
   --LoggerLevelMatchFilter
Variable Summary
Method Summary
integer decide (LoggerLoggingEvent $event)
boolean getAcceptOnMatch ()
void setAcceptOnMatch (boolean $acceptOnMatch)
void setLevelToMatch (string $l)
Variables
boolean $acceptOnMatch = true (line 46)
LoggerLevel $levelToMatch (line 51)

Inherited Variables

Inherited from LoggerFilter

LoggerFilter::$next
Methods
decide (line 98)

Return the decision of this filter.

Returns LOG4PHP_LOGGER_FILTER_NEUTRAL if the <var>LevelToMatch</var> option is not set or if there is not match. Otherwise, if there is a match, then the returned decision is LOG4PHP_LOGGER_FILTER_ACCEPT if the <var>AcceptOnMatch</var> property is set to true. The returned decision is LOG4PHP_LOGGER_FILTER_DENY if the <var>AcceptOnMatch</var> property is set to false.

integer decide (LoggerLoggingEvent $event)

Redefinition of:
LoggerFilter::decide()
Decide what to do.
getAcceptOnMatch (line 56)
boolean getAcceptOnMatch ()
getLevelToMatch (line 72)
LoggerLevel getLevelToMatch ()
setAcceptOnMatch (line 64)
void setAcceptOnMatch (boolean $acceptOnMatch)
  • boolean $acceptOnMatch
setLevelToMatch (line 80)
void setLevelToMatch (string $l)
  • string $l: the level to match

Inherited Methods

Inherited From LoggerFilter

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

Documentation generated by phpDocumentor 1.3.2