我无法找到配置我的虚拟教程Grails应用程序的方式,以记录Grails服务器(实际上是Tomcat)接受/生成的所有HTTP请求和响应。这可能吗?
解决方案另一个选择是使用tomcat内置的访问日志记录。 b $ b
tomcat.apache /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.
tomcat.apache/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
发布评论