MediaWiki master
|
Write logs to syslog with the channel appended to the application name. More...
Inherits SyslogUdpHandler.
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) | |
Write logs to syslog with the channel appended to the application name.
This use case for this handler is to emulate Wikimedia Foundation's udp2log system by leveraging syslog (and e.g. Rsyslog/Kafka) and allow an unstructured string to pass through mostly as-is, with the exception of the channel name, which is encoded in transit as part of the syslog "application name". It is intended that the syslog consumer "wildcard" subscribes to all messages with the app prefix, and then * strips it off at some point before writing the messages to a log file named after the channel.
Transition plan (2016):
Definition at line 47 of file MwlogHandler.php.
MediaWiki\Logger\Monolog\MwlogHandler::__construct | ( | $appprefix, | |
$host, | |||
$port = 514, | |||
$facility = LOG_USER, | |||
$level = Logger::DEBUG, | |||
$bubble = true ) |
string | $appprefix | Application prefix to use, channel will be appended. |
string | $host | Syslog host |
int | $port | Syslog port |
int | $facility | Syslog message facility |
int | $level | The minimum logging level at which this handler will be triggered |
bool | $bubble | Whether the messages that are handled can bubble up the stack or not |
Definition at line 69 of file MwlogHandler.php.
|
protected |
Definition at line 82 of file MwlogHandler.php.
|
protected |
Definition at line 102 of file MwlogHandler.php.