go-syslog icon indicating copy to clipboard operation
go-syslog copied to clipboard

Can rfc3164 (BSD syslog) parser support custom timestamp format?

Open KiVirgil opened this issue 5 years ago • 1 comments

rfc3164 parser can parse log like logStr = "<134>Jul 16 02:15:13 an 200050021 id=OS time="2020-7-16 02:15:13" timezone=GMT(+0000)", but can't parse log like logStr = "<134>Jul 16 2020 02:15:13 an 200050021 id=OS time="2020-7-16 02:15:13" timezone=GMT(+0000)". It will cause error: expecting a Stamp timestamp [col 14].

KiVirgil avatar Jul 16 '20 06:07 KiVirgil

I don't see an example of that type of log parsing in the test cases file. Would you be willing to add a test case and open a pr?

russorat avatar Jul 17 '20 15:07 russorat