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
but this didn't seem to work. After two hours of debugging, I figured out that log.py configures logging.basicConfig() when I import the module. This was unexpected as I have not seen a module configure logging before.
To configure logging the way I want it to work, I need to import cloudscale AFTER I have configured my logging:
(works)
from logger import configure_logging, log_info
configure_logging("api.log")
import cloudscale
log_info("My logging!")
(doesn't work)
from logger import configure_logging, log_info
import cloudscale
configure_logging("api.log")
log_info("My logging!")
Importing cloudscale after I have configured logging works, but sadly results in pretty ugly code... I don't think the cloudscale-python-sdk should touch logging.basicConfig(), but if you have a better (intended) solution, please let me know. :)
The text was updated successfully, but these errors were encountered:
I needed the cloudscale-python-sdk, as well as logging in my new project. I configured logging as usual:
but this didn't seem to work. After two hours of debugging, I figured out that log.py configures logging.basicConfig() when I import the module. This was unexpected as I have not seen a module configure logging before.
To configure logging the way I want it to work, I need to import cloudscale AFTER I have configured my logging:
(works)
(doesn't work)
Importing cloudscale after I have configured logging works, but sadly results in pretty ugly code... I don't think the cloudscale-python-sdk should touch logging.basicConfig(), but if you have a better (intended) solution, please let me know. :)
The text was updated successfully, but these errors were encountered: