diff options
author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-02-28 17:27:19 +0000 |
---|---|---|
committer | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-02-28 17:27:19 +0000 |
commit | 7a6daa8d92f4f11fe2fce8fb2f4b11d96cb98c2d (patch) | |
tree | bd30cbe16149f7211cb457b200ca0227492f991b /nova/log.py | |
parent | edf5da85648659b1a7ad105248d69ef9f8c977e4 (diff) | |
download | nova-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.py | 5 |
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(): |