Merged with trunk and fixed conflict. Sigh.

This commit is contained in:
Justin Santa Barbara
2011-03-07 15:30:58 -08:00
2 changed files with 9 additions and 3 deletions

View File

@@ -45,6 +45,8 @@ from nova import wsgi
LOG = logging.getLogger('nova.api')
FLAGS = flags.FLAGS
flags.DEFINE_string('paste_config', "api-paste.ini",
'File name for the paste.deploy config for nova-api')
if __name__ == '__main__':
@@ -57,9 +59,10 @@ if __name__ == '__main__':
for flag in FLAGS:
flag_get = FLAGS.get(flag, None)
LOG.debug("%(flag)s : %(flag_get)s" % locals())
conf = wsgi.paste_config_file('nova-api.conf')
conf = wsgi.paste_config_file(FLAGS.paste_config)
if not conf:
LOG.error(_("No paste configuration found for: %s"), 'nova-api.conf')
LOG.error(_("No paste configuration found for: %s"),
FLAGS.paste_config)
sys.exit(1)
else:
service = service.serve_wsgi(service.ApiService, conf)

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