Created
May 2, 2011 05:25
-
-
Save masatomo/951199 to your computer and use it in GitHub Desktop.
logging POST body in Google App Engine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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