-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use COBalD
log channels for logging in TARDIS
#146
Conversation
fc81414
to
59b157a
Compare
COBalD
log channels for logging in TARDIS
COBalD
log channels for logging in TARDIS
Oh that is great! I am really looking forward on how practical this is going to be. If it is as good as expected, we should also go for it in other projects! :) |
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.
Many log levels did change during this PR. Some also from debug to warning. It might be helpful to introduce a helping information for maintainers on what actually the reasoning for selecting proper levels is.
logger.info(f"Draining failed with: {str(cef)}") | ||
logger.info( |
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.
Why is the log level changed from debug
to info
?
tardis/adapters/sites/cloudstack.py
Outdated
logging.info("Quota exceeded") | ||
logging.debug(str(ce)) | ||
logger.warning("Quota exceeded") | ||
logger.warning(str(ce)) |
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.
Here are also interesting changes of log level, info
-> warning
and debug
-> warning
. Especially the jump from debug to warning is interesting. As this is actually not two warnings, we might think about joining the strings?
Yes, many log levels did change since there was no convention on this. :-/ @maxfischer2781 has proposed something in #137.
I would suggest to add this to the |
Yes, adding the log level convention as well would be helpful. |
Thanks for opening an issue. |
Hi @rcaspart, @eileen-kuehn, @maxfischer2781, this pull request needs two reviews. ;-) Thanks, |
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.
Log channels and levels look okay to me. Thanks for cleaning this up.
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.
thanks a lot for the introduction of the log channels and cleaning up of the log levels.
I have a few minor suggestions related to consistent usage of assertLogs in the unittests. Can you please have a look at them?
Co-authored-by: Rene Caspart <rene.caspart@cern.ch>
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
=======================================
Coverage 99.07% 99.08%
=======================================
Files 40 40
Lines 1520 1524 +4
=======================================
+ Hits 1506 1510 +4
Misses 14 14
Continue to review full report at Codecov.
|
Thanks for your suggestions, I have applied them to the code. |
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.
Thanks, looks good to go 👍
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.
Whoops, sorry for the delay. Go for it!
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.
Go for it! 👍
This pull request introduces logging channels as suggested in
COBalD
s documentation and #137 correspondingly. This will improve the user's ability to filter log messages according their needs.