forked from mcuadros/go-syslog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for timestamp in RFC3339 format (mcuadros#47)
Default Go log/syslog is sending syslog messages in that format: https://github.com/golang/go/blob/9745eed4fd4160cfbf55e9dbbfa99aca5563b392/src/log/syslog/syslog.go#L294 That is not according to the standard: "The TIMESTAMP field is the local time and is in the format of "Mmm dd hh:mm:ss" (without the quote marks)" (https://tools.ietf.org/html/rfc3164#section-5.3) But it is necessery if we want to parse lines sent by log/syslog. One small fix, time.Stamp is same as those two formats: - "Jan 02 15:04:05", - "Jan 2 15:04:05", + time.Stamp,
- Loading branch information
Showing
2 changed files
with
51 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters