title: log request body using scala http filter
body: <p>i am using this filter to save log about request and response time:</p>
  
  <pre><code>import play.api.Logger
  import play.api.mvc._
  import scala.concurrent.Future
  import play.api.libs.concurrent.Execution.Implicits.defaultContext
  
  object LoggingFilter extends Filter {
    def apply(nextFilter: (RequestHeader) =&gt; Future[SimpleResult])
             (requestHeader: RequestHeader): Future[SimpleResult] = {
      val startTime = System.currentTimeMillis
      nextFilter(requestHeader).map { result =&gt;
        val endTime = System.currentTimeMillis
        val requestTime = endTime - startTime
        Logger.info(s"${requestHeader.method} ${requestHeader.uri} " +
          s"took ${requestTime}ms and returned ${result.header.status}")
        result.withHeaders("Request-Time" -&gt; requestTime.toString)
      }
    }
  }
  </code></pre>
  
  <p>however i need to save the request body in the log. i know that this can be done using Scala action composition but i cant figure out how to get this done.
  any help??</p>