-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with timestamps #139
Comments
Upon digging, this seems to be a bug in glossy |
Interestingly enough, I think that bug may have already been fixed back in 2016 (squeeks/glossy#34), but glossy hasn't had any new releases since 2014. There's actually a second bug which only occurs when milliseconds are less than 100:
This library doesn't seem to be well-maintained, but there is a way to work around both of these bugs:
I have a more fully-fledged example app here in case it's helpful: https://github.com/bmaupin/graylog-syslog-examples/tree/main/winston |
- Use the correct time zone (fixes winstonjs#139) - Fix formatting for milliseconds (fixes winstonjs#156) - Add tests
Running into trouble with generated timestamps in both protocols
Under BSD it generates a timestamp using local time without timezone. While this may actually be to spec, it does not produce expected result. Would be nice to have option to force time to be UTC
Under 5424 format things look much worse. I am seeing BOTH UTC time AND local timezone
So the generated timestamp looks like this:
2020-04-23T02:54:14.364-07:00
when "02:54:14.364" is the UTC time, not local (-7) time - so combination of both makes wrong timeVery strange and I am surprised I am the only one to notice.
example code:
this produces line:
<134>1 2020-04-24T03:25:12.980-07:00 localhost myapp 57665 - - {"message":"What rolls down stairs","level":"info"}
when local time is
Thu Apr 23 20:25:12 PDT 2020
The text was updated successfully, but these errors were encountered: