1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Inline _write method

This commit is contained in:
Jesper Skovgaard Nielsen
2013-10-31 11:04:32 +01:00
parent 56e4610ab8
commit 272328f248

View File

@@ -71,14 +71,9 @@ class SyslogUdpHandler extends AbstractProcessingHandler
protected function write(array $record)
{
$this->_write(array('message' => $record['formatted'], 'priority' => $record['level']));
}
$lines = $this->splitMessageIntoLines($record['formatted']);
protected function _write($event)
{
$lines = $this->splitMessageIntoLines($event['message']);
$header = $this->makeCommonSyslogHeader($this->getSeverity($event['priority']));
$header = $this->makeCommonSyslogHeader($this->getSeverity($record['level']));
foreach ($lines as $line) {
$this->socket->write($line, $header);