Suppress stack traces unless --verbose is specified

This commit is contained in:
Kevin L. Mitchell
2011-02-28 17:27:19 +00:00
parent a08f1945b3
commit baec3cf72d

View File

@@ -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():