summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2015-01-20 17:13:34 -0500
committerJohn Dennis <jdennis@redhat.com>2015-01-27 10:02:12 -0500
commitad6ece11224957eff3f5ad8b64c41031a17aaed9 (patch)
tree2378dab97f065475629aae4c1e2eeddcaca48576
parent034fd7a63e5582e18f1436388a2abc2b23567396 (diff)
downloadipsilon-ad6ece11224957eff3f5ad8b64c41031a17aaed9.tar.gz
ipsilon-ad6ece11224957eff3f5ad8b64c41031a17aaed9.tar.xz
ipsilon-ad6ece11224957eff3f5ad8b64c41031a17aaed9.zip
Add request/response logging via cherrypy tool hooks
The ability to easily review the HTTP Ipsilon request and response is boon for development and issue debugging. Normally these HTTP conversations occur on SSL/TLS encrypted connections making it difficult to use other tools to view the traffic. Client side tools have known pitfalls (e.g. Firebug) and not all conversations are browser initiated (e.g. SAML ECP). Logging performed by the server hosting Ipsilon makes logging at the server level server specific (e.g. Apache's dumpio requires post-processing the log file to extract and reassamble the HTTP conversation). The best place to log requests and responses is within Ipsilon using the cherrypy framework Ipsilon is embedded in. Cherrypy provides user defined hooks that can be invoked at specific places in the request pipeline. We establish a hook at the last stage just before the response is written to the client, it logs the incoming request and outgoing response. Signed-off-by: John Dennis <jdennis@redhat.com>
-rw-r--r--ipsilon/util/log.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/ipsilon/util/log.py b/ipsilon/util/log.py
index 0a7a9df..788cc34 100644
--- a/ipsilon/util/log.py
+++ b/ipsilon/util/log.py
@@ -248,7 +248,6 @@ def log_request_response():
cherrypy.tools.log_request_response = cherrypy.Tool('on_end_resource',
log_request_response)
-
class Log(object):
@staticmethod