Tomcat上的Grails - 如何记录原始HTTP请求/响应 [英] Grails on Tomcat - How to log raw HTTP request/response
问题描述
我无法找到配置我的虚拟教程Grails应用程序的方式,以记录Grails服务器(实际上是Tomcat)接受/生成的所有HTTP请求和响应。这可能吗?
另一个选择是使用tomcat内置的访问日志记录。 b $ b
http://tomcat.apache.org /tomcat-6.0-doc/config/valve.html#Access_Log_Valve
我自己使用这个,它是相当可配置的。
如何配置tomcat 6
< Valve className =org.apache.catalina.valves.AccessLogValvedirectory =logs
prefix =localhost_access_log。 suffix =。txtpattern =commonresolveHosts =false/>
将此添加到标签为主机下的server.xml配置文件的末尾。
I couldn't find the way to configure my dummy tutorial Grails application to log all HTTP requests and responses accepted/generated by Grails server (actually - Tomcat). Is this possible?
Another option would be to use tomcat's built in access logging.
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access_Log_Valve
Im using this myself, and it is quite configurable.
How to configure tomcat 6
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
Add this to the end of your server.xml config under the tag "Host".
这篇关于Tomcat上的Grails - 如何记录原始HTTP请求/响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!