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

proposal: log: support millisecond timestamp resolution #60249

Open
mitar opened this issue May 17, 2023 · 4 comments · May be fixed by #60246
Open

proposal: log: support millisecond timestamp resolution #60249

mitar opened this issue May 17, 2023 · 4 comments · May be fixed by #60246
Labels
Milestone

Comments

@mitar
Copy link
Contributor

mitar commented May 17, 2023

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).

@mitar mitar added the Proposal label May 17, 2023
@gopherbot gopherbot added this to the Proposal milestone May 17, 2023
@seankhliao
Copy link
Member

I think this falls into the same category as #34416 (comment)

@mitar
Copy link
Contributor Author

mitar commented May 17, 2023

I think this is a minimal change, very similar to existing code.

mitar added a commit to mitar/go that referenced this issue May 17, 2023
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
@mitar mitar linked a pull request May 17, 2023 that will close this issue
@gopherbot
Copy link

Change https://go.dev/cl/495298 mentions this issue: log: support millisecond timestamp resolution

mitar added a commit to tozd/dinit that referenced this issue Jun 7, 2023
@yifan513
Copy link

Any progress? This is so useful.

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

Successfully merging a pull request may close this issue.

4 participants