Class LoggerStringMatchFilter

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 LOG4PHP_LOGGER_FILTER_ACCEPT if the AcceptOnMatch option value is 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.3

Located in /varia/LoggerStringMatchFilter.php (line 40)

LoggerFilter
   |
   --LoggerStringMatchFilter
Variable Summary
Method Summary
integer decide ( $event)
boolean getAcceptOnMatch ()
string getStringToMatch ()
void setAcceptOnMatch (mixed $acceptOnMatch)
void setStringToMatch (string $s)
Variables
boolean $acceptOnMatch = true (line 45)
string $stringToMatch = null (line 50)

Inherited Variables

Inherited from LoggerFilter

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

Redefinition of:
LoggerFilter::decide()
Decide what to do.
getAcceptOnMatch (line 55)
boolean getAcceptOnMatch ()
getStringToMatch (line 73)
string getStringToMatch ()
setAcceptOnMatch (line 63)
void setAcceptOnMatch (mixed $acceptOnMatch)
  • mixed $acceptOnMatch: a boolean or a string ('true' or 'false')
setStringToMatch (line 81)
void setStringToMatch (string $s)
  • string $s: the string to match

Inherited Methods

Inherited From LoggerFilter

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

Documentation generated by phpDocumentor 1.3.2