-
Notifications
You must be signed in to change notification settings - Fork 40
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
fix logging #1769
fix logging #1769
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.
I'm not sure I understand the use case of logging in the unittests. But as this is just updating what was currently implemented it looks good to me.
So we use 'warnings' instead of logging for deprecated code - is this because it means the deprecation message will always be displayed no matter what the logging level is? |
Yes and also it will only be displayed once per interpeter session rather than once per function call. |
- logging vs warnings (TomographicImaging#1769) - complexobj (TomographicImaging#1645)
Changes
logging
usage (fixes Inconsistency in how logging works across CIL #1755)log.warnings
=>warnings.warn
logger
=>log
for consistency & brevityTesting you performed
TESTS_FORCE_GPU=1 python -m unittest discover ./Wrappers/Python/test
Related issues/links
Checklist
I have added docstrings in line with the guidance in the developer guideI have updated the relevant documentationI have implemented unit tests that cover any new or modified functionalityCHANGELOG.md has been updated with any functionality changeContribution Notes
Please read and adhere to the developer guide and local patterns and conventions.