Comment 2 for bug 58060

Revision history for this message
John A Meinel (jameinel) wrote :

We used to see this. I don't remember if it was a specific bug in paramiko. But I beliieve it was caused whenever the logging subsystem was not initialized.

>>> import logging
>>> l = logging.getLogger('foobar')
>>> l.warning('bar')
No handlers could be found for logger "foobar"

So the issue is that the logging module doesn't have any log handlers installed, and paramiko is writing something that it expects to be logged.
(I don't know if this is a warning, or just a plain debug message)

a call to 'logging.basicConfig()' suppresses the "No handlers" warning, because it is now able to actually handle the l.warning() statement.

I think the issue is that paramiko is trying to log something after we have started doing cleanup, and already removed our logging handlers (that redirect the logs to a temporary file).

I'm not sure what the best fix would be.