title: how to log request and response body and headers with reslet?
body: <p>I would like to log all request and response bodies and the headers for a restlet service.</p>
  
  <p>For example, the following java options allow you to configure detailed logging on an Axis2 service:</p>
  
  <pre><code>JAVA_OPTS=
   -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog 
   -Dorg.apache.commons.logging.simplelog.showdatetime=true  
   -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug 
   -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug
  </code></pre>
  
  <p>How can I configure similar with Restlet 2?  Preferably I should be able to configure logging, and not have to write code to achieve my goal.</p>