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

x/net/trace: support lazy logging in EventLog #18320

Open
RaduBerinde opened this issue Dec 14, 2016 · 1 comment
Open

x/net/trace: support lazy logging in EventLog #18320

RaduBerinde opened this issue Dec 14, 2016 · 1 comment
Milestone

Comments

@RaduBerinde
Copy link
Contributor

Trace supports LazyLog/LazyPrintf which delays rendering of the event message until (and more importantly if) it is being displayed. This would be useful for EventLog as well, where large messages can cause noticeable slowdown.

I can work on the change if there is agreement on the new API. We can:

  • add LazyPrintf/LazyErrorf primitives, or
  • leave the current Printf/Errorf interface as is but document that the string is lazily generated.
@bradfitz bradfitz changed the title net/trace: support lazy logging in EventLog x/net/trace: support lazy logging in EventLog Dec 14, 2016
@bradfitz bradfitz added this to the Unreleased milestone Dec 14, 2016
@RaduBerinde
Copy link
Contributor Author

RaduBerinde commented Feb 2, 2017

Any thoughts? I will work on the change, I just need some guidance wrt the options I mentioned.

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