Merged with trunk and fixed conflict. Sigh.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user