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

Log level for errors is "info" #4245

Closed
rosemary-wang opened this issue Apr 23, 2024 · 5 comments · Fixed by #4327
Closed

Log level for errors is "info" #4245

rosemary-wang opened this issue Apr 23, 2024 · 5 comments · Fixed by #4327

Comments

@rosemary-wang
Copy link

Hi team, I have a question regarding the log level chosen for the generated code. I noticed that info level is used for everything, even for obvious errors such as "failed to decode message". I'm curious about the motivation behind this choice. Thank you!

@johanbrandhorst
Copy link
Collaborator

Hi Rosemary, thanks for your issue! I don't think the log level of these messages have changed since they were first introduced, and I doubt the level was considered much. If you have any thoughts on ways to differentiate different log messages, it might make for a great contribution! The logic for the generated file is mostly here: https://github.com/grpc-ecosystem/grpc-gateway/blob/main/protoc-gen-grpc-gateway/internal/gengateway/template.go.

@rajeshkarnena
Copy link
Contributor

Hello @johanbrandhorst @rosemary-wang, can I help with a PR for this?

I also noticed that a few log statements in the package runtime did not follow the correct log level, e.g., this one and this one. Is that intentional?

@rosemary-wang
Copy link
Author

i haven't started working on this so feel free to take it

@johanbrandhorst
Copy link
Collaborator

Feel free to open a PR

@rajeshkarnena
Copy link
Contributor

Here you go, please review #4327

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

Successfully merging a pull request may close this issue.

3 participants