mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-21 13:33:52 +01:00
SyslogUdpHandler: Send a valid rfc5424 version
https://tools.ietf.org/html/rfc5424#section-6.2.2
This commit is contained in:
parent
3d2567a2f1
commit
04094e5d99
@ -63,11 +63,11 @@ class SyslogUdpHandler extends AbstractSyslogHandler
|
||||
/**
|
||||
* Make common syslog header (see rfc5424)
|
||||
*/
|
||||
private function makeCommonSyslogHeader($severity)
|
||||
protected function makeCommonSyslogHeader($severity)
|
||||
{
|
||||
$priority = $severity + $this->facility;
|
||||
|
||||
return "<$priority>: ";
|
||||
return "<$priority>1 ";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,10 +32,10 @@ class SyslogUdpHandlerTest extends \PHPUnit_Framework_TestCase
|
||||
$socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol'));
|
||||
$socket->expects($this->at(0))
|
||||
->method('write')
|
||||
->with("lol", "<".(LOG_AUTHPRIV + LOG_WARNING).">: ");
|
||||
->with("lol", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 ");
|
||||
$socket->expects($this->at(1))
|
||||
->method('write')
|
||||
->with("hej", "<".(LOG_AUTHPRIV + LOG_WARNING).">: ");
|
||||
->with("hej", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 ");
|
||||
|
||||
$handler->setSocket($socket);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user