From: Clint Byrum Date: Sat, 7 Sep 2013 04:17:14 +0000 (-0700) Subject: Pass debug mode to eventlet.wsgi.server X-Git-Tag: 2014.1~40^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9510e87e421bc64d9784a171f7c49168e69898f4;p=openstack-build%2Fheat-build.git 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 --- 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