[node-patches] Change in ovirt-node[master]: app: Improve debugging
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Thu Aug 29 15:56:56 UTC 2013
Fabian Deutsch has uploaded a new change for review.
Change subject: app: Improve debugging
......................................................................
app: Improve debugging
Change-Id: Ieeaf9df83657c24545e31f8239fdef1e0ecf18f7
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/app.py
1 file changed, 15 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/01/18701/1
diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index fc5563e..5c97be5 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -47,18 +47,28 @@
mixedfile = StringIO("""
[loggers]
keys=root
+
[handlers]
-keys=debug
+keys=debug,error
+
[formatters]
keys=verbose
+
[logger_root]
-level=DEBUG
-handlers=debug
+level=NOTSET
+handlers=debug,error
+
+[handler_error]
+class=StreamHandler
+level=ERROR
+args=()
+
[handler_debug]
class=FileHandler
level=DEBUG
formatter=verbose
args=('/tmp/ovirt-node.debug.log', 'w')
+
[formatter_verbose]
format=%(levelname)10s %(asctime)s %(pathname)s:%(lineno)s:%(funcName)s: \
%(message)s
@@ -307,11 +317,11 @@
sys.exit(0)
self.ui.run()
except Exception as e:
- if self.args.debug:
- raise
console.reset()
self.logger.error("An error appeared in the UI: %s" % repr(e))
self.logger.debug("Exception:", exc_info=True)
+ if self.args.debug:
+ raise
console.writeln("Press ENTER to logout ...")
console.writeln("or enter 's' to drop to shell")
if console.wait_for_keypress() == 's':
--
To view, visit http://gerrit.ovirt.org/18701
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieeaf9df83657c24545e31f8239fdef1e0ecf18f7
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