How to capture post method request in access log file?

依然范特西╮ 提交于 2019-12-07 23:39:25

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!!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!