diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-02-17 18:38:07 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-02-17 18:38:07 +0000 |
| commit | c1591451f69e81ea5563757cbac5f49dc446b3cd (patch) | |
| tree | 11d90e3dad6c343a99ec7438737b9c5b5e851b4c /nova/api | |
| parent | 97c08950ae660a4e60893d57f21f52657156b999 (diff) | |
| parent | 2f317ba79f262a8cd325844a1a258efab22e5fa1 (diff) | |
| download | nova-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__.py | 10 |
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.')) |
