一: tomcat 從version4開始支持 valve 指令, 所以我們有兩種方法設置tomcat 的日誌 (我tomcat 是 Version5.0)
1.1 關於valve: http://www.oxxus.net/tutorials/tomcat/tomcat-valve.htm
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
1.1.1 定義,用途
A Tomcat valve - a new technology introduced with Tomcat 4 which allows you to associate an instance of a Java class with a particular Catalina container.
This configuration allows the named class to act as a preprocessor of each request. These classes are called valves, and they must implement the org.apache.catalina.Valve interface or extend the org.apache.catalina.valves.ValveBase class. Valves are proprietary to Tomcat and cannot, at this time, be used in a different servlet/JSP container. At this writing, Tomcat comes configured with four valves:
- Access Log - Remote Address Filter - Remote Host Filter - Request Dumper
1.1.2 例子
<Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".txt" pattern="common"/>
1.2 關於Logger http://blogger.org.cn/blog/more.asp?name=DMman&id=24177
<Logger className="org.apache.catalina.logger.FileLogger" directory="/var/log/tomcat4log" prefix="catalina_log." suffix=".txt" timestamp="true"/>
1.3 tomcat從5.5版本開始要自己配置日誌系統,推薦用log4j: http://crybaby2005.bokee.com/6080370.html
1.4 關於日誌管理工具: cronolog
http://www.sudu.cn/info/html/edu/linux/20080425/301526.html
http://blog.tom.com/benge_zhao/article/4748.html
http://humint.blog.ccidnet.com/blog-htm-do-showone-uid-22648-itemid-89636-type-blog.html
1.5 多日誌的合併分析
http://doc.linuxpk.com/2040.html
訪問日誌 和 出錯日誌 如何分別紀錄?
一些tomcat 設置
http://www.wangchao.net.cn/bbsdetail_63464.html