Question

I am enabling the access log in jboss Server by uncommenting the below code in server.xml file

       <Valve className="org.apache.catalina.valves.AccessLogValve"
        prefix="localhost_access_log." suffix=".log"
        pattern="common" directory="${jboss.server.home.dir}/log" 
        resolveHosts="false" />

Access logs are creating on the daily basis. I am able to see get method request in access log file but not able to see post method request. How can I capture the details of post method request in server access log file in jboss.

Thanks in advance !

Was it helpful?

Solution

You are using pattern as common which is equivalents to '%h %l %u %t "%r" %s %b.

There is another pattern attribute %m --> for Request method (GET, POST, etc.) add that to your pattern e.g.

   <Valve className="org.apache.catalina.valves.AccessLogValve"
    prefix="localhost_access_log." suffix=".log"
    pattern="'%h %l %u %t "%r" %s %b %m" directory="${jboss.server.home.dir}/log" 
    resolveHosts="false" />

More details are available here: Tomcat Access Valves.

Hope this helps!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top