1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-18 23:26:20 +02:00

finishing Syslog formatter (#1689)

* feat: Syslog formatter

* feat: Syslog formatter, app name

* update syslogFormatter

* Remove legacy syntax

Co-authored-by: Dalibor Karlović <dalibor.karlovic@sigwin.hr>
Co-authored-by: Renat Gabdullin <renatobyj@gmail.com>
This commit is contained in:
picass0
2022-07-22 18:17:53 +04:00
committed by GitHub
parent 7684fae8fa
commit a7e5beda57
9 changed files with 214 additions and 27 deletions

View File

@@ -22,23 +22,6 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
{
protected int $facility;
/**
* Translates Monolog log levels to syslog log priorities.
*/
protected function toSyslogPriority(Level $level): int
{
return match ($level) {
Level::Debug => \LOG_DEBUG,
Level::Info => \LOG_INFO,
Level::Notice => \LOG_NOTICE,
Level::Warning => \LOG_WARNING,
Level::Error => \LOG_ERR,
Level::Critical => \LOG_CRIT,
Level::Alert => \LOG_ALERT,
Level::Emergency => \LOG_EMERG,
};
}
/**
* List of valid log facility names.
* @var array<string, int>