Log the exception so app loading issues can be debuged
* Fixes LP1004062 Change-Id: Iae04f2789fe310a52550354463fe109c13e8ceeb
This commit is contained in:
parent
acab9fba55
commit
686982198c
@ -32,6 +32,7 @@ from paste import deploy
|
|||||||
from quantum.common import flags
|
from quantum.common import flags
|
||||||
|
|
||||||
|
|
||||||
|
LOG = logging.getLogger(__name__)
|
||||||
DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
|
DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s"
|
||||||
DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
|
||||||
|
|
||||||
@ -315,10 +316,11 @@ def load_paste_app(app_name, options, args):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
app = deploy.loadapp("config:%s" % conf_file, name=app_name)
|
app = deploy.loadapp("config:%s" % conf_file, name=app_name)
|
||||||
except (LookupError, ImportError), e:
|
except (LookupError, ImportError):
|
||||||
raise RuntimeError("Unable to load %(app_name)s from "
|
msg = ("Unable to load %(app_name)s from "
|
||||||
"configuration file %(conf_file)s."
|
"configuration file %(conf_file)s.") % locals()
|
||||||
"\nGot: %(e)r" % locals())
|
LOG.exception(msg)
|
||||||
|
raise RuntimeError(msg)
|
||||||
return conf, app
|
return conf, app
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user