-
Notifications
You must be signed in to change notification settings - Fork 4
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
ballcosmos destroys logging configuration #27
Comments
python-ballcosmos/ballcosmos/__init__.py Lines 21 to 24 in 86ec6d2
If I comment out these lines I don't get the logging behavior overwrite |
This setting overwrites any logging configuration made by the consumer of this library. Closes BallAerospace#27
The logging.basicConfig() function is used to configure the logging system in Python. It should be called only once at the beginning of the program to set up the logging configuration. By calling logging.basicConfig() more than once, the configuration of the logging system will be reset to its default settings, and any previous logging configuration will be lost. In the code you provided, calling ballcosmos() after logging.basicConfig() will reset the logging configuration to its default settings and destroy any previous logging handlers, which may cause unexpected behavior in the logging system. If you need to use ballcosmos() after configuring the logging system, you should ensure that it does not reset the logging configuration, or you should reconfigure the logging system after calling ballcosmos(). |
I understand that, but a Python library should not be setting the logging configuration. |
if ballcosmos is imported it overwrites my existing logging configuration
The text was updated successfully, but these errors were encountered: