summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-02-17 18:38:07 +0000
committerGerrit Code Review <review@openstack.org>2012-02-17 18:38:07 +0000
commitc1591451f69e81ea5563757cbac5f49dc446b3cd (patch)
tree11d90e3dad6c343a99ec7438737b9c5b5e851b4c /nova/api
parent97c08950ae660a4e60893d57f21f52657156b999 (diff)
parent2f317ba79f262a8cd325844a1a258efab22e5fa1 (diff)
downloadnova-c1591451f69e81ea5563757cbac5f49dc446b3cd.tar.gz
nova-c1591451f69e81ea5563757cbac5f49dc446b3cd.tar.xz
nova-c1591451f69e81ea5563757cbac5f49dc446b3cd.zip
Merge "Allow file logging config"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py
index 416783c45..937e1ed80 100644
--- a/nova/api/ec2/__init__.py
+++ b/nova/api/ec2/__init__.py
@@ -627,9 +627,13 @@ class Executor(wsgi.Application):
context=context)
return ec2_error(req, request_id, type(ex).__name__, unicode(ex))
except Exception as ex:
- extra = {'environment': req.environ}
- LOG.exception(_('Unexpected error raised: %s'), unicode(ex),
- extra=extra, context=context)
+ env = req.environ.copy()
+ for k in env.keys():
+ if not isinstance(env[k], basestring):
+ env.pop(k)
+
+ LOG.exception(_('Unexpected error raised: %s'), unicode(ex))
+ LOG.error(_('Environment: %s') % utils.dumps(env))
return ec2_error(req, request_id, 'UnknownError',
_('An unknown error has occurred. '
'Please try your request again.'))