Skip to content
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

Missing the milliseconds in Graylog #27

Open
FerhatSavci opened this issue Jul 16, 2018 · 5 comments
Open

Missing the milliseconds in Graylog #27

FerhatSavci opened this issue Jul 16, 2018 · 5 comments
Labels

Comments

@FerhatSavci
Copy link

Line 146 in message.go (v2.0 branch) is currently:

TimeUnix: float64(time.Now().Unix()),

Unix time is in seconds since 1.1.1970, thus, log entries in Graylog get the milliseconds truncated.

TimeUnix: float64(time.Now().UnixNano()) / float64(time.Second.Nanoseconds()),

works nicely.

Best regards.

@joschi joschi added the bug label Jul 16, 2018
@valentin-krasontovitsch

there's a merge request for this already: #23. Although I hardcoded the time.Second.Nanoseconds() as 1e9... I must admit that your solution is more expressive, hence in my opinion betterer.

Not sure why it hasn't been merged yet though.

@che
Copy link

che commented Nov 23, 2019

Could you add time.Second.Nanoseconds() also for TLS branch?
Thanks!

P.S. Maybe make sense to create branch v3 where to merge v2 and tls branches?

@valentin-krasontovitsch
Copy link

valentin-krasontovitsch commented Dec 4, 2019

After a quick look, it seems to me that the tls branch can easily be rebased on top of the current v2 branch, and merged afterwards - in my humble opinion, there's not even any need to cut a new release, as this would simply constitute an extension of the currently existing API, without any (breaking) changes in existing behaviour...

gonna wait a bit though for the short vs. long message merge request (#34) to be accepted, as that one requires some editing of the tests introduced in tls.

@che
Copy link

che commented Dec 5, 2019

Great!
I'll waiting.
And on this moment merging v2 and tls branches works fine.
Thanks!

@netbidev
Copy link

netbidev commented Mar 14, 2020

Hello.

I am waiting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants