Francesco Romani has uploaded a new change for review.

Change subject: logging: fix the exception handler
......................................................................

logging: fix the exception handler

In the exception handler of the MOM class constructor, there
are two issues

- one, major, is about the name of the logging reference, which
  wasn't updated. This will lead to MOM blow in the error (recovery!)
  path.
- one, minor, is about the old way to log exceptions, using
  the exc_info=True argument.

This patch fixes both.

Change-Id: I58741b7e430180c969f5596575e8b8461de49076
Signed-off-by: Francesco Romani <from...@redhat.com>
---
M mom/__init__.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/16/37816/1

diff --git a/mom/__init__.py b/mom/__init__.py
index e720b3e..7d2f3ff 100644
--- a/mom/__init__.py
+++ b/mom/__init__.py
@@ -40,7 +40,7 @@
             self._setupAPI(momFuncs)
             rpc_server = RPCServer(self.config, momFuncs)
         except Exception as e:
-            self.log.error("Failed to initialize MOM threads", exc_info=True)
+            self.logger.exception("Failed to initialize MOM threads")
             return
 
         interval = self.config.getint('main', 'main-loop-interval')


-- 
To view, visit http://gerrit.ovirt.org/37816
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58741b7e430180c969f5596575e8b8461de49076
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <from...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to