1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 05:07:36 +02:00

Support for extended RFC5424 timestamp format

As described in [RFC5424 Timestamp format](https://tools.ietf.org/html/rfc5424#section-6.2.3), it is allowed to send second fraction as doted mili (3 digits) or micro (6 digits) in syslog messages. I suggest this modest PR to support it.
This commit is contained in:
Pierre Lannoy
2020-09-03 14:22:34 +02:00
committed by GitHub
parent bbe10b1e28
commit 36e25bafe0

View File

@@ -25,10 +25,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
{
const RFC3164 = 0;
const RFC5424 = 1;
const RFC5424e = 2;
private $dateFormats = array(
self::RFC3164 => 'M d H:i:s',
self::RFC5424 => \DateTime::RFC3339,
self::RFC5424e => \DateTime::RFC3339_EXTENDED,
);
protected $socket;