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

Support ignore logging for v2(already attached PR) #649

Closed
linhbkhn95 opened this issue Sep 22, 2023 · 3 comments
Closed

Support ignore logging for v2(already attached PR) #649

linhbkhn95 opened this issue Sep 22, 2023 · 3 comments

Comments

@linhbkhn95
Copy link

linhbkhn95 commented Sep 22, 2023

Background

I just upgraded from v1 to v2. But I have a problem with the logging package.
Currently, I have not seen an ignore logging feature like v1 at v2.

What did I do

So, I decided to make a PR at #648 to do it.

Confirmation

Feel free to confirm that I have missed something about v2
Otherwise, Please review my PR for solving this problem as quickly as possible.
Sorry If my mistake.
Many thanks,

@linhbkhn95
Copy link
Author

@johanbrandhorst Please help me with this issue. I really appreciate that.

@msmith
Copy link

msmith commented Sep 22, 2023

FYI: The README for v2 mentions that deciders were intentionally removed:

All "deciders", so functions that decide what to do based on gRPC service name and method (aka "fullMethodName") are removed (!). Use github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/selector interceptor to select what method, type or service should use what interceptor.

However, I think the selector middleware is not a 100% replacement for deciders because they don't allow you to make a logging decision based on the error response. For example, I may want to only log a healthcheck rpc when it fails, but I don't think you can do that with the selector interceptor.

@linhbkhn95
Copy link
Author

@msmith thank for your response

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

No branches or pull requests

2 participants