ITeye博客

tomcat格式化配置访问日志

aooboo · 2010-09-19 23:36 · web service · 互联网 · C · Apache · C++ · C# · Tomcat · Markdown

[code="java"] [/code] tomcat 格式化访问日志,而且可以从header、session中取值,很爽,节约大量的统计工作! 摘录官方网站一段: There is also support to write information from the cookie, incoming header, the Session or something else in the ServletRequest. It is modeled after the apache syntax: * %{xxx}i for incoming headers * %{xxx}o for outgoing response headers * %{xxx}c for a specific cookie * %{xxx}r xxx is an attribute in the ServletRequest * %{xxx}s xxx is an attribute in the HttpSession 官方文档页面:http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。