[node-patches] Change in ovirt-node[master]: base: Reduce logging

fabiand at redhat.com fabiand at redhat.com
Thu Jul 17 13:23:14 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: base: Reduce logging
......................................................................

base: Reduce logging

Previously calls of core functions were logged, this lead to a huge
amount of logging data.
Now that the core is stable we can disbale the logging.

Change-Id: Ifb281f21929abf1bcf0b8800617c1d0349281472
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/base.py
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/29/30229/1

diff --git a/src/ovirt/node/base.py b/src/ovirt/node/base.py
index 31c04c9..73dbf97 100644
--- a/src/ovirt/node/base.py
+++ b/src/ovirt/node/base.py
@@ -71,25 +71,29 @@
             self.callbacks = []
             self.logger = log.getLogger(self.__module__)
 
+        def _debug(self, msg):
+            pass
+            #self._debug(msg)
+
         def emit(self, userdata=None):
             """Emit a signal
             """
-            # self.logger.debug("%s: %s" % (self, self.callbacks))
+            self._debug("%s: %s" % (self, self.callbacks))
             for idx, cb in enumerate(self.callbacks):
-                self.logger.debug("%s (%d/%d) %s" %
-                                  (self, idx + 1, len(self.callbacks), cb))
+                self._debug("%s (%d/%d) %s" %
+                            (self, idx + 1, len(self.callbacks), cb))
                 if cb(self.target, userdata) is False:
-                    self.logger.debug("Breaking callback sequence")
+                    self._debug("Breaking callback sequence")
                     break
             return self
 
         def connect(self, cb):
-            # self.logger.debug("Connecting %s with %s" % (self, cb))
+            self._debug("Connecting %s with %s" % (self, cb))
             self.callbacks.append(cb)
             return self
 
         def clear(self):
-            self.logger.debug("Clearing callbacks on %s" % self)
+            self._debug("Clearing callbacks on %s" % self)
             self.callbacks = []
 
         def target_property(self):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb281f21929abf1bcf0b8800617c1d0349281472
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list