Change in vdsm[master]: bridge: Fix logging in dispatch

alitke at redhat.com alitke at redhat.com
Tue Oct 20 20:45:27 UTC 2015


Adam Litke has uploaded a new change for review.

Change subject: bridge: Fix logging in dispatch
......................................................................

bridge: Fix logging in dispatch

The dispatch function in DynamicBridge tries to log using an
uninitialized instance variable.  Also, logging was not imported by this
module.  Fix both of these problems.

Change-Id: I6053bb322143c260bd57102480655c7efe6d34c0
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M vdsm/rpc/Bridge.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/47545/1

diff --git a/vdsm/rpc/Bridge.py b/vdsm/rpc/Bridge.py
index 9765387..31b1c2b 100644
--- a/vdsm/rpc/Bridge.py
+++ b/vdsm/rpc/Bridge.py
@@ -16,6 +16,7 @@
 from functools import partial
 
 import inspect
+import logging
 import threading
 import types
 
@@ -31,6 +32,9 @@
     _glusterEnabled = True
 except ImportError:
     _glusterEnabled = False
+
+
+log = logging.getLogger('Bridge')
 
 
 class VdsmError(Exception):
@@ -77,7 +81,7 @@
             result = fn(argobj)
         except VdsmError as e:
             # TBD: Do we really want to always log here
-            self.log.debug("Operation failed, returning error", exc_info=True)
+            log.exception("Operation failed, returning error")
             raise yajsonrpc.JsonRpcError(e.code, e.message)
 
         return result


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6053bb322143c260bd57102480655c7efe6d34c0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>


More information about the vdsm-patches mailing list