Class LoggerStringMatchFilter

Description

This is a very simple filter based on string matching.

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.

Located in Program_Root/log4php/varia/LoggerStringMatchFilter.php (line 49)

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

Inherited Variables

Inherited from LoggerFilter

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

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

Inherited Methods

Inherited From LoggerFilter

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

Documentation generated on Wed, 3 Sep 2003 01:02:47 +0200 by phpDocumentor 1.2.2