mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-20 08:06:19 +02:00
Add Level::toRFC5424Level method and restore BC to Syslog handlers (broken in #1689)
This commit is contained in:
@@ -40,6 +40,14 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
|
||||
'uucp' => \LOG_UUCP,
|
||||
];
|
||||
|
||||
/**
|
||||
* Translates Monolog log levels to syslog log priorities.
|
||||
*/
|
||||
protected function toSyslogPriority(Level $level): int
|
||||
{
|
||||
return $level->toRFC5424Level();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant
|
||||
*/
|
||||
|
Reference in New Issue
Block a user