Logging each & every request at JBoss Server level

January 7, 2012 | Server

JBoss Logging


You can get this by uncommenting & replacing the following valve tag inside server.xml of JBOSS located at

(path depends on JBoss version)

<Valve className="org.apache.catalina.valves.AccessLogValve"
             prefix="localhost_access_log." suffix=".log"
             pattern="(%h) %t:  %r; Time taken to process the request, in millis - %D; Bytes sent, excluding HTTP headers, or '-' if zero - %b;"
            resolveHosts="false" />

Now you can get the total request time in millis from file localhost_access_log.log located at $JBOSS_HOME/default/log/

Pattern you can change according to your requirements. Ref. http://docs.jboss.org/jbossweb/2.1.x/config/valve.html for more information on Pattern.

Tags: ,

Comments (1)

  1. Cameron says:

    Very cool article. I have become impressed with this site

Leave a Reply to Cameron

If you have a Tip, Comment, Article or anything you want to share, please send it to: i@poisure.com