cachecontrol
cachecontrol copied to clipboard
No handlers could be found for logger "cachecontrol.controller"
Using the latest CacheControl and Python 2.7.
When I was using logging.basicConfig in my code, I was rarely getting the Cache Deserialization warning.
Now, once logging.basicConfig was removed, I am sometimes getting:
No handlers could be found for logger "cachecontrol.controller"
It appears that this is caused by the same deserialization warning, and the logger had no handlers attached.
Indeed, CacheControl's setup_logging() is only invoked for CLI tool.
I think there should be opt-in behavior for logging.
The result should be that whoever previously used logging.basicConfig in their own code will still get the warning when it's valid.
Whoever did not opt for any logging (did not use logging.basicConfig in their own code) will not get the warning.
Why was this left open?
I think it is safe to close when >= v0.12.7 is tagged.