Skip to content

Instantly share code, notes, and snippets.

@masatomo
Created May 2, 2011 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masatomo/951199 to your computer and use it in GitHub Desktop.
Save masatomo/951199 to your computer and use it in GitHub Desktop.
logging POST body in Google App Engine
class LoggerMiddleware(object):
def __init__(self, app):
self.app = app
def __call__(self, env, start_response):
request = webapp.Request(env)
if request.body:
logging.info(request.body)
return self.app(env, start_response)
application = LoggerMiddleware(SessionMiddleware(
webapp.WSGIApplication([
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment