Warning 'No handlers could be found for logger "bzr.paramiko"' during selftest
Bug #58060 reported by
Etienne Goyer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
Unassigned |
Bug Description
bzr selftest give the following warning :
No handlers could be found for logger "bzr.paramiko"
Output of "bzr selftest" attached. Paramiko 1.5.2 is installed.
description: | updated |
To post a comment you must log in.
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 getLogger( 'foobar' )
>>> l = logging.
>>> 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.