Class LoggerFilterStringMatch
This is a very simple filter based on string matching.
The filter admits two options LoggerFilterStringMatch::$stringToMatch
and LoggerFilterStringMatch::$acceptOnMatch
. If there is a match (using PHP_MANUAL#strpos between
the value of the LoggerFilterStringMatch::$stringToMatch
option and the message of the LoggerLoggingEvent
, then the LoggerFilterStringMatch::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:
{@example ../../examples/php/filter_stringmatch.php 19}
The corresponding XML file:
{@example ../../examples/resources/filter_stringmatch.xml 18}
- LoggerConfigurable
- LoggerFilter
- LoggerFilterStringMatch
Package: log4php\filters
Version: $Revision: 1213283 $
Since: 0.3
Located at filters/LoggerFilterStringMatch.php
Version: $Revision: 1213283 $
Since: 0.3
Located at filters/LoggerFilterStringMatch.php
public
|
|
public
|
|
public
integer
|
activateOptions(),
addNext(),
getNext()
|
setBoolean(),
setFileSize(),
setInteger(),
setLevel(),
setNumeric(),
setPositiveInteger(),
setString(),
warn()
|
ACCEPT,
DENY,
NEUTRAL
|
protected
boolean
|
$acceptOnMatch | true |
|
protected
string
|
$stringToMatch |
|
$next
|