On Wed, Sep 27, 2017 at 10:03:38AM -0300, Eduardo Habkost wrote: > Use logging module for the QMP debug messages. The only scripts > that set debug=True are iotests.py and guestperf/engine.py, and > they already call logging.basicConfig() to set up logging. > > Scripts that don't configure logging are safe as long as they > don't need debugging output, because debug messages don't trigger > the "No handlers could be found for logger" message from the > Python logging module. > > Scripts that already configure logging but don't use debug=True > (e.g. scripts/vm/basevm.py) will get QMP debugging enabled for > free. > > Cc: "Alex Bennée" <alex.ben...@linaro.org> > Cc: Fam Zheng <f...@redhat.com> > Cc: "Philippe Mathieu-Daudé" <f4...@amsat.org> > Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> > --- > scripts/qemu.py | 3 +-- > scripts/qmp/qmp.py | 13 ++++++------- > 2 files changed, 7 insertions(+), 9 deletions(-)
Reviewed-by: Daniel P. Berrange <berra...@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|