mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 05:36:45 +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:
@@ -25,10 +25,12 @@ class SyslogUdpHandler extends AbstractSyslogHandler
|
|||||||
{
|
{
|
||||||
const RFC3164 = 0;
|
const RFC3164 = 0;
|
||||||
const RFC5424 = 1;
|
const RFC5424 = 1;
|
||||||
|
const RFC5424e = 2;
|
||||||
|
|
||||||
private $dateFormats = array(
|
private $dateFormats = array(
|
||||||
self::RFC3164 => 'M d H:i:s',
|
self::RFC3164 => 'M d H:i:s',
|
||||||
self::RFC5424 => \DateTime::RFC3339,
|
self::RFC5424 => \DateTime::RFC3339,
|
||||||
|
self::RFC5424e => \DateTime::RFC3339_EXTENDED,
|
||||||
);
|
);
|
||||||
|
|
||||||
protected $socket;
|
protected $socket;
|
||||||
|
Reference in New Issue
Block a user