diff options
author | Joe Gordon <jogo@cloudscaling.com> | 2013-01-15 12:31:53 -0800 |
---|---|---|
committer | Joe Gordon <jogo@cloudscaling.com> | 2013-01-15 13:41:54 -0800 |
commit | 6dc5dde51765bc1cede519e42b27f30eb23e07e3 (patch) | |
tree | 27ea358423846ae42cb253755045c11139925648 | |
parent | 9670c932c913fccbca263713bd9cee1b5e149d1c (diff) | |
download | nova-6dc5dde51765bc1cede519e42b27f30eb23e07e3.tar.gz nova-6dc5dde51765bc1cede519e42b27f30eb23e07e3.tar.xz nova-6dc5dde51765bc1cede519e42b27f30eb23e07e3.zip |
Make nova-api logs more useful
The current logs make it hard to identify what API command is actually
being called, especially for POST, where the action is in the body.
* Whenever there is body, log it (info level)
* Log what function the API command maps to (debug level)
Change-Id: Ief14186b94e321d97575ee25e3507d3fc0178de6
-rw-r--r-- | nova/api/openstack/wsgi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py index 519669134..733685b14 100644 --- a/nova/api/openstack/wsgi.py +++ b/nova/api/openstack/wsgi.py @@ -919,6 +919,10 @@ class Resource(wsgi.Application): msg = _("Malformed request body") return Fault(webob.exc.HTTPBadRequest(explanation=msg)) + if body: + LOG.info(_("Action: '%(action)s', body: %(body)s") % locals()) + LOG.debug(_("Calling method %s") % meth) + # Now, deserialize the request body... try: if content_type: |