-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
proposal: log: support millisecond timestamp resolution #60249
Comments
I think this falls into the same category as #34416 (comment) |
I think this is a minimal change, very similar to existing code. |
Existing implementation had only microsecond or second resolution, but microsecond resolution could be seen as too precise (access to logs could be used for side channel attacks) while second resolution is not precise enough. This adds Lmilliseconds flag. Fixes golang#60249
Change https://go.dev/cl/495298 mentions this issue: |
Any progress? This is so useful. |
+1, the default seconds is pretty useless. |
consider using log/slog with https://pkg.go.dev/log/slog#TextHandler |
@seankhliao I wanted to, but the text format is too verbose with the |
I would suggest that alongside microsecond or second resolution Go log library would also have millisecond timestamp resolution.
Existing implementation has only microsecond or second resolution, but microsecond resolution could be seen as too precise (access to logs could be used for help with side channel attacks) while second resolution is not precise enough, at least for me, to grasp the evolution of events when many happen at the same time.
This would add the
Lmilliseconds
flag.I have made draft of the implementation here https://go-review.googlesource.com/c/go/+/495298 and it seems pretty minimal (#60246).
The text was updated successfully, but these errors were encountered: