I took the example from stdlib to send a message to go-syslog.
Line is incorrectly parsed:
hostname:
priority:28
facility:3
severity:4
client:127.0.0.1:65519
timestamp:2018-01-12 16:10:14 +0100 CET
content:2018-01-12T16:10:14+01:00 Callisto.local demotag[40516]: This is a daemon warning with demotag.
should be:
timestamp:2018-01-12 16:11:36 +0100 +0100
hostname:Callisto.local
content:This is a daemon warning with demotag.
priority:28
facility:3
tag:demotag
severity:4
client:127.0.0.1:61861
The problem is that stdlib is sending timestamp in time.RFC339 and go-syslog is expecting time in time.Stamp format.
It seams that go-syslog is following rfc, but it is strange that Go lib is not parsing syslog generated by standard library.
From rfc:
The TIMESTAMP field is the local time and is in the format of "Mmm dd hh:mm:ss" (without the quote marks)
I took the example from stdlib to send a message to go-syslog.
Line is incorrectly parsed:
should be:
The problem is that stdlib is sending timestamp in time.RFC339 and go-syslog is expecting time in time.Stamp format.
It seams that go-syslog is following rfc, but it is strange that Go lib is not parsing syslog generated by standard library.
From rfc: