-
Notifications
You must be signed in to change notification settings - Fork 162
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
pkg/private/serrors: do not use reflect encoder for all context #4594
Conversation
Previously, the context was always encoded using the reflect encoder (which is just json marshaling). This has the bad side effect that the usual marshaling methods are not respected. E.g., error context that would in theory implement the fmt.Stringer method were just JSON encoded. With this change, we leave it up to zap to decide how the values are encoded based on their type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @lukedirtwalker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: all files reviewed (commit messages unreviewed), all discussions resolved (waiting on @lukedirtwalker)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @lukedirtwalker)
…context (scionproto#4594) Previously, the context was always encoded using the reflect encoder (which is just json marshaling). This has the bad side effect that the usual marshaling methods are not respected. E.g., error context that would in theory implement the fmt.Stringer method were just JSON encoded. With this change, we leave it up to zap to decide how the values are encoded based on their type.
Previously, the context was always encoded using the reflect encoder (which is just json marshaling). This has the bad side effect that the usual marshaling methods are not respected. E.g., error context that would in theory implement the fmt.Stringer method were just JSON encoded.
With this change, we leave it up to zap to decide how the values are encoded based on their type.