qemu.py: Call logging.basicConfig() automatically
Not all scripts using qemu.py configure the Python logging module, and end up generating a "No handlers could be found for logger" message instead of actual log messages. To avoid requiring every script using qemu.py to configure logging manually, call basicConfig() when creating a QEMUMachine object. This won't affect scripts that already set up logging, but will ensure that scripts that don't configure logging keep working. Reported-by: NKevin Wolf <kwolf@redhat.com> Fixes: 4738b0a8Signed-off-by: NEduardo Habkost <ehabkost@redhat.com> Message-Id: <20170921162234.847-1-ehabkost@redhat.com> Reviewed-by: NCleber Rosa <crosa@redhat.com> Acked-by: NLukáš Doktor <ldoktor@redhat.com> Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Showing
想要评论请 注册 或 登录