You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
By importing openbb the default logger is manipulated impacting host applications.
To Reproduce
Run this code:
importlogginglogging.basicConfig(level=logging.INFO)
logging.info("This message is shown")
importopenbblogging.info("This message is hidden")
Notice: That the host application messages which are printed after importing openbb no longer function the same.
At the very least it would be nice to be able to disable this behavior with a user/system setting so that the host application can control logging. Yes the application can override, but because this happens when openbb is imported it can happen at any time while the application is running. This design effectively forces the user to import openbb at a controlled location to then override these settings which is of course not ideal.
Desktop (please complete the following information):
I don't believe this is a bug. Warnings and errors are handled internally by the application and passed forward. The OpenBB environment can be configured to display console messages and/or tracebacks.
You can enable warnings verbosity in the file, ~/.openbb_platform/user_settings.json
{
"preferences": {
"show_warnings": false,
}
}
Debug mode is enabled with an environment variable. This passes through the complete Exception with traceback.
OPENBB_DEBUG_MODE=true
@montezdesousa, do you have anything to add that can clarify?
Hey @ncimino 👋 Thanks for bringing this to our attention. While we look into this ourselves if you have any suggestions on how to change the LoggingService, they would be very appreciated.
Describe the bug
By importing openbb the default logger is manipulated impacting host applications.
To Reproduce
Run this code:
Notice: That the host application messages which are printed after importing openbb no longer function the same.
At the very least it would be nice to be able to disable this behavior with a user/system setting so that the host application can control logging. Yes the application can override, but because this happens when openbb is imported it can happen at any time while the application is running. This design effectively forces the user to import openbb at a controlled location to then override these settings which is of course not ideal.
Desktop (please complete the following information):
Additional context
I believe this is due to the
LoggingService
changing the default logging configuration:https://github.com/OpenBB-finance/OpenBB/blob/develop/openbb_platform/core/openbb_core/app/logs/logging_service.py#L122-L128
The text was updated successfully, but these errors were encountered: