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

Fix logrus interceptor #588

Merged

Conversation

chancez
Copy link
Contributor

@chancez chancez commented Jun 6, 2023

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

I've tested logrus in my own project, but I haven't fully tested the zap changes, though it should be equivalent.

The logic in the example is redundant with the logging.Fields Iterator

Signed-off-by: Chance Zibolski <[email protected]>
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

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

Nice, thanks

@johanbrandhorst johanbrandhorst merged commit 2aace1a into grpc-ecosystem:v2 Jun 7, 2023
@chancez chancez deleted the pr/chancez/fix_logrus_interceptor branch June 7, 2023 23:01
rahulkhairwar pushed a commit to rahulkhairwar/go-grpc-middleware that referenced this pull request Jul 6, 2023
* interceptors: Fix logrus example to iterate over all fields

Fixes grpc-ecosystem#570

Signed-off-by: Chance Zibolski <[email protected]>

* interceptors: Update zap InterceptorLogger to use Iterator properly

The logic in the example is redundant with the logging.Fields Iterator

Signed-off-by: Chance Zibolski <[email protected]>

---------

Signed-off-by: Chance Zibolski <[email protected]>
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.

2 participants