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

Stringer event method #185

Merged
merged 1 commit into from May 28, 2020
Merged

Stringer event method #185

merged 1 commit into from May 28, 2020

Conversation

hummerd
Copy link
Contributor

@hummerd hummerd commented Oct 1, 2019

Call to log.Str("url", url.String()) can lead to unnecessary allocations while executing String().
So introduce new log.Stringer("url", url) method, that call to String() only if logging enabled.

@rs rs merged commit 7825d86 into rs:master May 28, 2020
ccamel added a commit to ccamel/zerolog that referenced this pull request Jun 17, 2020
Same than rs#185 but for zerolog.Context.
rs pushed a commit that referenced this pull request Jun 18, 2020
Same than #185 but for zerolog.Context.
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

Successfully merging this pull request may close these issues.

None yet

2 participants