Merge lp:~klmitch/nova/lp725349 into lp:~hudson-openstack/nova/trunk

Proposed by Kevin L. Mitchell
Status: Merged
Approved by: Devin Carlen
Approved revision: 750
Merged at revision: 764
Proposed branch: lp:~klmitch/nova/lp725349
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 15 lines (+4/-1)
1 file modified
nova/log.py (+4/-1)
To merge this branch: bzr merge lp:~klmitch/nova/lp725349
Reviewer Review Type Date Requested Status
Vish Ishaya (community) Approve
Devin Carlen (community) Approve
Review via email: mp+51579@code.launchpad.net

Description of the change

Inhibit inclusion of stack traces in the logs UNLESS --verbose has been specified. This should help keep the logs compact, helping admins find the messages they're interested in (e.g., "Can't connect to MySQL server on '127.0.0.1' (111)") without having to sort through the stack traces, while still allowing developers to see those traces at will.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
Vish Ishaya (vishvananda) wrote :

This also lgtm. I'm leaving it in Needs Review for a little while in case anyone else has any comments.

review: Approve
Revision history for this message
Kevin L. Mitchell (klmitch) wrote :

Haven't seen any additional comments (unless maybe I missed something?)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/log.py'
2--- nova/log.py 2011-02-24 19:50:27 +0000
3+++ nova/log.py 2011-02-28 17:36:40 +0000
4@@ -266,7 +266,10 @@
5
6
7 def handle_exception(type, value, tb):
8- logging.root.critical(str(value), exc_info=(type, value, tb))
9+ extra = {}
10+ if FLAGS.verbose:
11+ extra['exc_info'] = (type, value, tb)
12+ logging.root.critical(str(value), **extra)
13
14
15 def reset():