[node-patches] Change in ovirt-node[master]: ui: Adjust some logging messages and comments

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Aug 21 16:04:48 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: ui: Adjust some logging messages and comments
......................................................................

ui: Adjust some logging messages and comments

Change-Id: Ic11a3888a720b9a0775ac73c18aea5bc4a9daf8b
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/app.py
M src/ovirt/node/base.py
M src/ovirt/node/ui/urwid_builder.py
3 files changed, 11 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/79/18379/1

diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index a5d1224..c9485aa 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -62,7 +62,8 @@
 format=%(levelname)10s %(asctime)s %(pathname)s:%(lineno)s:%(funcName)s: \
 %(message)s
         """)
-    logging.config.fileConfig(mixedfile)
+    logging.debug("Setting log config to: %s" % mixedfile)
+    logging.config.fileConfig(mixedfile, disable_existing_loggers=False)
 
 
 configure_logging()
@@ -100,6 +101,7 @@
         self.plugin_base = plugin_base
 
     def __parse_cmdline(self):
+        self.logger.debug("Parsing cmdline args")
         parser = OptionParser()
         parser.add_option("--defaults",
                           dest="defaults",
diff --git a/src/ovirt/node/base.py b/src/ovirt/node/base.py
index 4e3bee0..563fdcd 100644
--- a/src/ovirt/node/base.py
+++ b/src/ovirt/node/base.py
@@ -73,18 +73,18 @@
         def emit(self, userdata=None):
             """Emit a signal
             """
-            self.logger.debug("Running %s callbacks: %s" % (self,
-                                                            self.callbacks))
+            #self.logger.debug("%s: %s" % (self, self.callbacks))
             for idx, cb in enumerate(self.callbacks):
-                self.logger.debug("(%d/%d) %s emits %s" %
-                                  (idx + 1, len(self.callbacks), self, cb))
+                self.logger.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.logger.debug("Breaking callback sequence: %s" %
+                                      self.callbacks)
                     break
             return self
 
         def connect(self, cb):
-            self.logger.debug("Connecting %s with %s" % (self, cb))
+            #self.logger.debug("Connecting %s with %s" % (self, cb))
             self.callbacks.append(cb)
             return self
 
diff --git a/src/ovirt/node/ui/urwid_builder.py b/src/ovirt/node/ui/urwid_builder.py
index 8afbd83..9a73593 100644
--- a/src/ovirt/node/ui/urwid_builder.py
+++ b/src/ovirt/node/ui/urwid_builder.py
@@ -264,6 +264,7 @@
         urwid.connect_signal(widget, "changed", on_change_cb)
 
         def on_item_value_change_cb(p, v):
+            # Update the selection in the ui.Element
             widget.selection(v)
 
         ui_table.on_value_change.connect(on_item_value_change_cb)
@@ -540,6 +541,7 @@
             for d in self.__widget_stack:
                 if d.title == dialog:
                     dialog = d
+        self.logger.debug("Closing dialog: %s" % dialog)
         self.logger.debug("Widget stack: %s" % self.__widget_stack)
         new_stack = [w for w in self.__widget_stack if w != dialog]
         self.__widget_stack = new_stack


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic11a3888a720b9a0775ac73c18aea5bc4a9daf8b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list