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
DEBUG logging for _api.py was accidentally enabled #104
Comments
Not at all, see #97 (comment) |
The |
That's not true 😊 It depends on your log handler. Generally, when setting log levels you should fine-tune it at the log handler level, not the logger itself. from logging import StreamHandler
handler = StreamHandler()
handler.setLevel(logging.WARNING) The level on the root log handler is not what level all child loggers should be but instead is the level to pass through for when users don't specify a name for the logger.
I think what's unexpected is expecting changing the root loggers level to have an impact on other loggers. |
The most basic configuration of python logging does not involve manually adding/modifying handlers. For example, if you use In the I see that we have different understandings of the relations between loggers and handlers. I might be missing something and I'm happy to learn something new :) EDIT: The described baseConfig() call set the root logger level and not the handler level. |
That's unfortunate. 🤔 |
Hi! First of all, thank you very much for this package, it has been pretty useful in a project I am involved in. I would like to know what is the status on this issue, and are there any changes planned? I will leave some of my feedback as well that I hope helps with making a decisions about it. I am writing to you because our pipelines are now failing due to the introduction of the logging with a default level of DEBUG. Everything is working of course, but now our pipelines get filled with logging messages that were not expected there before, a bit of a breaking change for us at least. From consulting the python docs https://docs.python.org/3/howto/logging.html#when-to-use-logging:
And perhaps also relevant:
Considering the contents of the python documentation, would you consider leaving the logger level unspecified such that it defaults to That would solve the issue discussed above and the issue that I am facing myself. I almost never had to add extra lines of code to just silence debug/info logs of specific packages, and would say that is not a very smooth experience for developers if for example most packages required adding these extra lines for each package (and potentially for each module and submodule of a package). Hope this helps 😊 Looking forward to your thoughts! |
Waiting for someone to put in a PR to fix it 😊 |
I came here to report this too, but I could never have explained the issue as eloquently as @caenrigen. Thanks! |
@gaborbernat Thank you very much for resolving this 😊 |
I've just seen that filelock started to print DEBUG logs even though I'm using INFO level globally. I assume this got in accidentally?
The text was updated successfully, but these errors were encountered: