-
Notifications
You must be signed in to change notification settings - Fork 49
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
Re-use PanLogger instances if the parameters haven't changed. #192
Conversation
It appears the build failed due to a network issue. Closing and reopening PR to trigger build again. |
Codecov Report
@@ Coverage Diff @@
## develop #192 +/- ##
===========================================
+ Coverage 81.27% 81.32% +0.05%
===========================================
Files 37 37
Lines 2654 2662 +8
Branches 330 331 +1
===========================================
+ Hits 2157 2165 +8
Misses 392 392
Partials 105 105
Continue to review full report at Codecov.
|
FYI, there is a Restart Build button on travis. Let me know if you don't have access to 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.
In PanBase
there is a global that is making sure this doesn't happen, but that is only for objects that inherit from PanBase. I'm guessing that you ran into this with some of the abstract dome class, which I noticed doesn't inherit from PanBase.
I like the json solution but it seems like it would also just have the problem of creating multiple all_loggers
each time it is loaded.
As long as importing works correctly, all the imports of pocs.utils.logger will reference the same one module instance, so they'll share the same global (module scope) variable |
Let's remove the global |
get_root_logger.
PTAL |
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.
👍
Fixes #190.