From 9510e87e421bc64d9784a171f7c49168e69898f4 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Fri, 6 Sep 2013 21:17:14 -0700 Subject: [PATCH] Pass debug mode to eventlet.wsgi.server Previously if any exceptions accidentally made their way to eventlet.wsgi.server's response handler it would print their traceback. We only want to show users tracebacks in debug mode. In production we want them suppressed. Fixes bug #1222008 Change-Id: Ieb11f75ebffc67bd584432cfd8eeaac010fce7ca --- heat/common/wsgi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/heat/common/wsgi.py b/heat/common/wsgi.py index f50c521d..7147f8ab 100644 --- a/heat/common/wsgi.py +++ b/heat/common/wsgi.py @@ -136,6 +136,7 @@ api_cw_group = cfg.OptGroup('heat_api_cloudwatch') cfg.CONF.register_group(api_cw_group) cfg.CONF.register_opts(api_cw_opts, group=api_cw_group) +cfg.CONF.import_opt('debug', 'heat.openstack.common.log') class WritableLogger(object): @@ -310,7 +311,8 @@ class Server(object): self.application, custom_pool=self.pool, url_length_limit=URL_LENGTH_LIMIT, - log=WritableLogger(self.logger)) + log=WritableLogger(self.logger), + debug=cfg.CONF.debug) except socket.error as err: if err[0] != errno.EINVAL: raise -- 2.45.2