-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
proto: should not print to fmt or log #667
Comments
Can we suppress these warnings (at least this one: |
What was the rationale for having the same The |
Our app. uses two 3rd-party packages. One is a http client and the second one is a server. Both register the same types. In our app. we vendor both packages, because some users may want to talk over http, where others may prefer having embedded server. |
In other words, I'm not against warnings, I'd like to have a option to suppress them by setting log level or by passing own logger. |
What you are describing seems to be a case of the logging statement correctly complaining about a real issue. In order for some parts of the protobuf ecosystem to work correctly (e.g., Several things to note:
That is one possibility, but I'm hesitant to add API for something that is actually a problem. |
:/ With go modules, we will also however begin allowing separate major versions of proto packages. Will the full module+package name be used or the package name alone? If the later, then modules will not resolve this issue, but could even exacerbate the issue? |
@puellanivis, I'm not sure I follow the concern. Is the issue regarding registration and major version change of generated protos? Can you mention it on #268, and we can discuss further there. Let's keep this issue about the |
This is fixed in the upcoming v1.4.0 release. |
It is generally considered a code smell when a library prints to
log
. We should investigate whether these are actually necessary and remove them or turn them into errors.The text was updated successfully, but these errors were encountered: