title: Tornado: How to log response for all API requests
body: <p>I am working on Tornado web server. I want to implement function log request and response for each request. In tornado, I can get whole data of request content but cannot get response body. I have tried using middleware, but middleware doesn't return response also. How can I achieve this purpose.</p>
  
  <p>Thanks</p>