Class LoggerFilterLevelMatch

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 LoggerFilter::ACCEPT in case the <var>AcceptOnMatch</var> option value is set to true, if it is false then LoggerFilter::DENY is returned. If there is no match, LoggerFilter::NEUTRAL is returned.

An example for this filter:

    The corresponding XML file:

      • version: $Revision: 1213283 $
      • since: 0.6

      Located in /log4php/filters/LoggerFilterLevelMatch.php (line 48)

      LoggerConfigurable
         |
         --LoggerFilter
            |
            --LoggerFilterLevelMatch
      Variable Summary
      Method Summary
      integer decide (LoggerLoggingEvent $event)
      void setAcceptOnMatch (boolean $acceptOnMatch)
      void setLevelToMatch ( $level, string $l)
      Variables
      boolean $acceptOnMatch = true (line 54)

      Indicates if this event should be accepted or denied on match

      • access: protected
      LoggerLevel $levelToMatch (line 60)

      The level, when to match

      • access: protected

      Inherited Variables

      Inherited from LoggerFilter

      LoggerFilter::$next
      Methods
      decide (line 89)

      Return the decision of this filter.

      Returns LoggerFilter::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 LoggerFilter::ACCEPT if the <var>AcceptOnMatch</var> property is set to true. The returned decision is LoggerFilter::DENY if the <var>AcceptOnMatch</var> property is set to false.

      • access: public
      integer decide (LoggerLoggingEvent $event)

      Redefinition of:
      LoggerFilter::decide()
      Decide what to do.
      setAcceptOnMatch (line 65)
      • access: public
      void setAcceptOnMatch (boolean $acceptOnMatch)
      • boolean $acceptOnMatch
      setLevelToMatch (line 72)
      • access: public
      void setLevelToMatch ( $level, string $l)
      • string $l: the level to match
      • $level

      Inherited Methods

      Inherited From LoggerFilter

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

      Inherited From LoggerConfigurable

      LoggerConfigurable::setBoolean()
      LoggerConfigurable::setFileSize()
      LoggerConfigurable::setInteger()
      LoggerConfigurable::setLevel()
      LoggerConfigurable::setNumeric()
      LoggerConfigurable::setPositiveInteger()
      LoggerConfigurable::setString()
      LoggerConfigurable::warn()
      Class Constants

      Documentation generated on Thu, 16 Feb 2017 18:02:39 +0900 by phpDocumentor 1.4.4