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 47)

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 52)
string $stringToMatch = null (line 57)

Inherited Variables

Inherited from LoggerFilter

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

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

Inherited Methods

Inherited From LoggerFilter

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

Documentation generated on Mon, 15 Sep 2003 21:13:22 +0200 by phpDocumentor 1.2.2