Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make zap.AtomicLevel implement fmt.Stringer #431

Merged
merged 1 commit into from
May 12, 2017

Conversation

billf
Copy link
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 prashantv and akshayjshah May 9, 2017 23:16
Copy link
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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants