Tomcat上的Grails

编程入门 行业动态 更新时间:2024-10-27 17:23:44
本文介绍了Tomcat上的Grails - 如何记录原始HTTP请求/响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我无法找到配置我的虚拟教程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

本文发布于:2023-11-25 13:40:02,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Tomcat   Grails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!