cachecontrol icon indicating copy to clipboard operation
cachecontrol copied to clipboard

No handlers could be found for logger "cachecontrol.controller"

Open dvershinin opened this issue 5 years ago • 3 comments

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.

dvershinin avatar Sep 06 '20 09:09 dvershinin

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.

dvershinin avatar Sep 06 '20 09:09 dvershinin

Why was this left open?

hexagonrecursion avatar Feb 19 '21 09:02 hexagonrecursion

I think it is safe to close when >= v0.12.7 is tagged.

dvershinin avatar Feb 19 '21 17:02 dvershinin