本文共 2674 字,大约阅读时间需要 8 分钟。
1、日志分割设置
<host> … <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --> … </host> |
<host> … <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="XXX_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> … </host> |
<host> … <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="XXX_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> … </host> |
<host> … <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="XXX_log." suffix=".txt" timestamp="true"/> … </host> |
<host> … <Context path="/wwwlogs" docBase="x:/tomcat/logs" crossContext="true" debug="0" reloadable="true" trusted="false" > </Context> … </host> |
<host> … <Context path="/wwwlogs" docBase="x:/tomcat/logs" crossContext="true" debug="0" reloadable="true" trusted="false" > <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow=" xxx.xxx.xxx.xxx "/> </Context> … </host> |
<access-log path="logs/access" archive-format="access-%Y%m%d.log.gz" format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1D"/> |
转载地址:http://crkix.baihongyu.com/