MediaWiki REL1_39
MediaWiki\Logger\Monolog\MwlogHandler Class Reference

Log handler that will append the record's channel to a fixed 'application prefix' given at construction time. More...

Inheritance diagram for MediaWiki\Logger\Monolog\MwlogHandler:
Collaboration diagram for MediaWiki\Logger\Monolog\MwlogHandler:

Public Member Functions

 __construct ( $appprefix, $host, $port=514, $facility=LOG_USER, $level=Logger::DEBUG, $bubble=true)
 

Protected Member Functions

 syslogHeader ( $severity, $app)
 
 write (array $record)
 

Detailed Description

Log handler that will append the record's channel to a fixed 'application prefix' given at construction time.

The use case for this handler is to deprecate udp2log with a localhost syslog endpoint. The application name is then used to reconstruct the message's channel.

Since
1.32
Note
© 2019 Wikimedia Foundation and contributors

Definition at line 37 of file MwlogHandler.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Logger\Monolog\MwlogHandler::__construct ( $appprefix,
$host,
$port = 514,
$facility = LOG_USER,
$level = Logger::DEBUG,
$bubble = true )
Parameters
string$appprefixApplication prefix to use, channel will be appended.
string$hostSyslog host
int$portSyslog port
int$facilitySyslog message facility
int$levelThe minimum logging level at which this handler will be triggered
bool$bubbleWhether the messages that are handled can bubble up the stack or not

Definition at line 59 of file MwlogHandler.php.

Member Function Documentation

◆ syslogHeader()

MediaWiki\Logger\Monolog\MwlogHandler::syslogHeader ( $severity,
$app )
protected

Definition at line 72 of file MwlogHandler.php.

◆ write()

MediaWiki\Logger\Monolog\MwlogHandler::write ( array $record)
protected

Definition at line 92 of file MwlogHandler.php.


The documentation for this class was generated from the following file: