Warning 'No handlers could be found for logger "bzr.paramiko"' during selftest

Bug #58060 reported by Etienne Goyer
2
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.

Revision history for this message
Etienne Goyer (etienne-goyer-outlands) wrote :
John A Meinel (jameinel)
description: updated
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.

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

The specific error is indicative of not having logging setup, and paramiko trying to log something through logging.getLogger().

With paramiko 1.6.2 (current) and bzr.dev, I was not able to reproduce this, so either we are always initializing logging, or paramiko is doing something better.

For now, I think we have fixed it.

Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.