title: Server processing time in tomcat access logs
body: <p>In order to debug a performance issue I enabled access logs in tomcat. We are not using any apache server. Its the embedded tomcat that we are using.</p>
  
  <p>I'm using following pattern for access logs.</p>
  
  <pre><code>access-patten = %h %l %u %t "%r" %s %b %D
  </code></pre>
  
  <p>%D = time at which first byte of the request is received ~ time at which last byte of the response is send.</p>
  
  <p>So %D includes network latency as well.</p>
  
  <p>But how do I print time difference between first byte of the request received and first byte of the response sent.</p>