Closed rauizab closed 5 years ago
Changing this line from 6 to 9 seems to work for both timestamp. https://github.com/mcuadros/go-syslog/blob/master/internal/syslogparser/rfc5424/rfc5424.go#L427
RFC5424 specifies TIME-SECFRAC can be at most 6 digits, so whatever client you're using is not RFC-compliant. This is even covered in an example.
TIME-SECFRAC = "." 1*6DIGIT
Example 5 - An Invalid TIMESTAMP
2003-08-24T05:14:15.000000003-07:00
This example is nearly the same as Example 4, but it is specifying
TIME-SECFRAC in nanoseconds. This results in TIME-SECFRAC being
longer than the allowed 6 digits, which invalidates it.
Thanks for the clarification.
Hi
For syslog message:
Result
It is having problems parsing the timestamp. Is there a way to config the time formatting?
I dont know why but when running in Mac it works but doing it on linux not. In mac I get this message. It looks that in mac there 2 digits less of precision in the timestamp.
Thanks in advanced