MediaWiki REL1_28
|
Log handler that replicates the behavior of MediaWiki's wfErrorLog() logging service. More...
Public Member Functions | |
__construct ( $stream, $useLegacyFilter=false, $level=Logger::DEBUG, $bubble=true) | |
close () | |
Protected Member Functions | |
errorTrap ( $code, $msg) | |
Custom error handler. | |
openSink () | |
Open the log sink described by our stream URI. | |
useUdp () | |
Should we use UDP to send messages to the sink? | |
write (array $record) | |
Protected Attributes | |
$error | |
$host | |
$port | |
$prefix | |
$sink | |
Log sink. | |
$uri | |
Log sink descriptor. | |
$useLegacyFilter | |
Filter log events using legacy rules. | |
Log handler that replicates the behavior of MediaWiki's wfErrorLog() logging service.
Log output can be directed to a local file, a PHP stream, or a udp2log server.
For udp2log output, the stream specification must have the form: "udp://HOST:PORT[/PREFIX]" where:
When not targeting a udp2log stream this class will act as a drop-in replacement for \Monolog\Handler\StreamHandler.
Definition at line 50 of file LegacyHandler.php.
MediaWiki\Logger\Monolog\LegacyHandler::__construct | ( | $stream, | |
$useLegacyFilter = false , |
|||
$level = Logger::DEBUG , |
|||
$bubble = true |
|||
) |
string | $stream | Stream URI |
bool | $useLegacyFilter | Filter log events using legacy rules |
int | $level | Minimum logging level that will trigger handler |
bool | $bubble | Can handled meesages bubble up the handler stack? |
Definition at line 96 of file LegacyHandler.php.
References MediaWiki\Logger\Monolog\LegacyHandler\$useLegacyFilter.
MediaWiki\Logger\Monolog\LegacyHandler::close | ( | ) |
Definition at line 227 of file LegacyHandler.php.
References MediaWiki\Logger\Monolog\LegacyHandler\useUdp().
|
protected |
Custom error handler.
int | $code | Error number |
string | $msg | Error message |
Definition at line 167 of file LegacyHandler.php.
|
protected |
Open the log sink described by our stream URI.
Definition at line 110 of file LegacyHandler.php.
References port().
Referenced by MediaWiki\Logger\Monolog\LegacyHandler\write().
|
protected |
Should we use UDP to send messages to the sink?
Definition at line 175 of file LegacyHandler.php.
Referenced by MediaWiki\Logger\Monolog\LegacyHandler\close(), and MediaWiki\Logger\Monolog\LegacyHandler\write().
|
protected |
Definition at line 179 of file LegacyHandler.php.
References MediaWiki\Logger\Monolog\LegacyHandler\$prefix, MediaWiki\Logger\Monolog\LegacyHandler\openSink(), port(), MediaWiki\Logger\LegacyLogger\shouldEmit(), string, and MediaWiki\Logger\Monolog\LegacyHandler\useUdp().
|
protected |
Definition at line 73 of file LegacyHandler.php.
|
protected |
Definition at line 78 of file LegacyHandler.php.
|
protected |
Definition at line 83 of file LegacyHandler.php.
|
protected |
Definition at line 88 of file LegacyHandler.php.
Referenced by MediaWiki\Logger\Monolog\LegacyHandler\write().
|
protected |
Log sink.
Definition at line 68 of file LegacyHandler.php.
|
protected |
Log sink descriptor.
Definition at line 56 of file LegacyHandler.php.
|
protected |
Filter log events using legacy rules.
Definition at line 62 of file LegacyHandler.php.
Referenced by MediaWiki\Logger\Monolog\LegacyHandler\__construct().