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

Why is trace emitted twice? #97

Open
kaihendry opened this issue Aug 19, 2021 · 1 comment
Open

Why is trace emitted twice? #97

kaihendry opened this issue Aug 19, 2021 · 1 comment

Comments

@kaihendry
Copy link

https://play.golang.org/p/89gZ-Izsp_J

Emits three lines:

  1. {"fields":{"app":"myapp","env":"prod"},"level":"info","timestamp":"2009-11-10T23:00:00Z","message":"heavy operation"}
  2. Sleeping for 81ms
  3. {"fields":{"app":"myapp","duration":81,"env":"prod"},"level":"info","timestamp":"2009-11-10T23:00:00.081Z","message":"heavy operation"}

I didn't expect line number one! It doesn't have any value, does it?

@kishaningithub
Copy link

I feel the first one is needed for edge cases where point no 2 never terminates

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

No branches or pull requests

2 participants