Nir Soffer has uploaded a new change for review.

Change subject: vdsClient: Configure logging before imports
......................................................................

vdsClient: Configure logging before imports

Because vdscli logs devel warning on import, we get this unwanted
error from the logging module:

   No handlers could be found for logger "devel"

Configuring logging avoids this error.

Change-Id: Ib08c8908997becd948693a33df02c3240d3dcc6b
Bug-Url: https://bugzilla.redhat.com/1377069
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M client/vdsClient.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/64099/1

diff --git a/client/vdsClient.py b/client/vdsClient.py
index dde8b87..1f9ea52 100755
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -29,9 +29,14 @@
 import shlex
 import socket
 import pprint as pp
+import logging
 
 from six.moves import xmlrpc_client
 
+# Must configure logging before importing vdsm modules, some modules may log
+# warnings during import.
+logging.basicConfig(level=logging.ERROR)
+
 from vdsm import utils, vdscli, constants
 from vdsm.compat import json
 


-- 
To view, visit https://gerrit.ovirt.org/64099
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib08c8908997becd948693a33df02c3240d3dcc6b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to