summaryrefslogtreecommitdiffstats
path: root/nova/log.py
diff options
context:
space:
mode:
authorKevin L. Mitchell <kevin.mitchell@rackspace.com>2011-02-28 17:27:19 +0000
committerKevin L. Mitchell <kevin.mitchell@rackspace.com>2011-02-28 17:27:19 +0000
commit7a6daa8d92f4f11fe2fce8fb2f4b11d96cb98c2d (patch)
treebd30cbe16149f7211cb457b200ca0227492f991b /nova/log.py
parentedf5da85648659b1a7ad105248d69ef9f8c977e4 (diff)
downloadnova-7a6daa8d92f4f11fe2fce8fb2f4b11d96cb98c2d.tar.gz
nova-7a6daa8d92f4f11fe2fce8fb2f4b11d96cb98c2d.tar.xz
nova-7a6daa8d92f4f11fe2fce8fb2f4b11d96cb98c2d.zip
Suppress stack traces unless --verbose is specified
Diffstat (limited to 'nova/log.py')
-rw-r--r--nova/log.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/log.py b/nova/log.py
index 87a21ddb4..d194ab8f0 100644
--- a/nova/log.py
+++ b/nova/log.py
@@ -266,7 +266,10 @@ class NovaRootLogger(NovaLogger):
def handle_exception(type, value, tb):
- logging.root.critical(str(value), exc_info=(type, value, tb))
+ extra = {}
+ if FLAGS.verbose:
+ extra['exc_info'] = (type, value, tb)
+ logging.root.critical(str(value), **extra)
def reset():