8000
Skip to content

Make zap.AtomicLevel implement fmt.Stringer#431

Merged
akshayjshah merged 1 commit intouber-go:masterfrom
billf:atomiclevel
May 12, 2017
Merged

Make zap.AtomicLevel implement fmt.Stringer#431
akshayjshah merged 1 commit intouber-go:masterfrom
billf:atomiclevel

Conversation

@billf
Copy link
Copy Markdown
Contributor
@billf billf commented May 9, 2017

To make it convenient to use (zap.Config).Level as a zap.Field.
Writing zap.Stringer("level", config.Level) is more natural than the stuttering zap.Stringer("level", config.Level.Level()).

To make it convenient to use `(zap.Config).Level` as a `zap.Field`
itself. `zap.Stringer("level", config.Level)` is much more natural than
`zap.Stringer("level", config.Level.Level())`.
@billf billf requested review from akshayjshah and prashantv May 9, 2017 23:16
Copy link
Copy Markdown
Collaborator
@prashantv prashantv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already support MarshalText, supporting String makes a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0