mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Fix BC break and formatting
This commit is contained in:
@@ -27,12 +27,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
|
||||
/**
|
||||
* @param string $host
|
||||
* @param int $port
|
||||
* @param string $ident Program name or tag for each log message.
|
||||
* @param mixed $facility
|
||||
* @param int $level The minimum logging level at which this handler will be triggered
|
||||
* @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not
|
||||
* @param string $ident Program name or tag for each log message.
|
||||
*/
|
||||
public function __construct($host, $port = 514, $ident = 'php', $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true)
|
||||
public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php')
|
||||
{
|
||||
parent::__construct($facility, $level, $bubble);
|
||||
|
||||
@@ -73,11 +73,13 @@ class SyslogUdpHandler extends AbstractSyslogHandler
|
||||
{
|
||||
$priority = $severity + $this->facility;
|
||||
|
||||
if(!$pid = getmypid())
|
||||
if (!$pid = getmypid()) {
|
||||
$pid = '-';
|
||||
}
|
||||
|
||||
if(!$hostname = gethostname())
|
||||
if (!$hostname = gethostname()) {
|
||||
$hostname = '-';
|
||||
}
|
||||
|
||||
return "<$priority>1 " .
|
||||
$this->getDateTime() . " " .
|
||||
|
Reference in New Issue
Block a user