Tomcat 6 日誌輸出配置

修改Tomcat目錄的conf/server.xml web

apache

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false"> app

添加以下內容: webapp

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
               prefix="localhost_access_log." suffix=".txt" pattern="%{X-Real-IP}i %v %t %r %s %b %D" resolveHosts="false"/> spa


這樣在Tomcat的logs目錄下就有日誌文件了: 日誌

catalina.out server

host-manager.2015-07-27.log xml

localhost.2015-07-27.log io

localhost_access_log.2015-07-27.txt class

manager.2015-07-27.log

相關文章
相關標籤/搜索