-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve logging #42
Improve logging #42
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #42 +/- ##
==========================================
+ Coverage 75.00% 75.34% +0.34%
==========================================
Files 3 3
Lines 360 365 +5
==========================================
+ Hits 270 275 +5
Misses 90 90 ☔ View full report in Codecov by Sentry. |
Codecov diff hit fails because many of the logging calls here are triggered by conditions which are not tested 🙄 |
Still TODOAs the name suggests,
And eventually maybe
|
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.
Good!
I don't think we have to spend much effort into improving the logging of skycalc_ipy per se. However, I think your goal is to improve logging in all our projects, and from that perspective it is good to experiment here first.
Indeed that was the idea 🙂 |
Urgh, now this has conflicts because I merged #43 first |
Sounds like you were fhlogging yourself! Nooooo... I'll let myself out. It's Monday.. |
Correct loggers
Until now, our logging here used the root logger, which is the result of simply running
logging.warning()/error()/etc
without any other configuration. This is not ideal for a number of reasons and also "strongly advised" against in the docs. There are now three separateLoggers
, one for each module (core
andui
) and one top level logger for the package. As per the same paragraph in said docs, I included aNullHandler
to the top logger.Interoperability
In line with the planned changes in our other packages, all logger names start with
"astar."
, so it will be easy to collect all logging from all our packages if used together in the future.