-
Notifications
You must be signed in to change notification settings - Fork 2.5k
refactor: remove direct logging without a logger #4253
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good to me! 👍 The only question that remains is how to prevent that from happening again in future. Can be easily overlooked. 🤔 Before merging you'll just need to deal with pylint...
|
I'll need to remove the test, seems like PyTest is setting up loggers: https://github.com/deepset-ai/haystack/actions/runs/4254366090/jobs/7400573111 |
julian-risch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you found more of the problematic lines of code. Now we can be sure that we found all of them. The solution is more complex than I hoped but let's try it out and see if it works well for us. 👍
|
Agree! I also find it a bit complex, but on the other hand it's easy to remove in the moment when it causes trouble, so let's see how it goes 😊 |
Related Issues
Proposed Changes:
logging.debug|info|warning|error|criticalwith calls to each file's dedicated logger instance.How did you test it?
Notes for the reviewer
Check out the linked issue for the reasoning behind this change. The only changes applied here are related to logging lines and replace
loggingwithlogger, adding the linter and the test: everything else is out of scope.Checklist
I added tests that demonstrate the correct behavior of the changefix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.I documented my code