Class LoggerFilterStringMatch

Description

This is a very simple filter based on string matching.

The filter admits two options $stringToMatch and $acceptOnMatch. If there is a match (using http://www.php.net/strpos between the value of the $stringToMatch option and the message of the LoggerLoggingEvent, then the decide() method returns LoggerFilter::ACCEPT if the AcceptOnMatch option value is 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.3

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

      LoggerConfigurable
         |
         --LoggerFilter
            |
            --LoggerFilterStringMatch
      Variable Summary
      Method Summary
      integer decide (LoggerLoggingEvent $event)
      void setAcceptOnMatch (mixed $acceptOnMatch)
      void setStringToMatch ( $string, string $s)
      Variables
      boolean $acceptOnMatch = true (line 53)
      • access: protected
      string $stringToMatch (line 58)
      • access: protected

      Inherited Variables

      Inherited from LoggerFilter

      LoggerFilter::$next
      Methods
      decide (line 77)
      • return: a LOGGER_FILTER_NEUTRAL is there is no string match.
      • access: public
      integer decide (LoggerLoggingEvent $event)

      Redefinition of:
      LoggerFilter::decide()
      Decide what to do.
      setAcceptOnMatch (line 63)
      • access: public
      void setAcceptOnMatch (mixed $acceptOnMatch)
      • mixed $acceptOnMatch: a boolean or a string ('true' or 'false')
      setStringToMatch (line 70)
      • access: public
      void setStringToMatch ( $string, string $s)
      • string $s: the string to match
      • $string

      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:41 +0900 by phpDocumentor 1.4.4