标签:
修改Tomcat目录的conf/server.xml
在
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
添加如下内容:
<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"/>
这样在Tomcat的logs目录下就有日志文件了:
catalina.out
host-manager.2015-07-27.log
localhost.2015-07-27.log
localhost_access_log.2015-07-27.txt
manager.2015-07-27.log
标签:
原文地址:http://my.oschina.net/u/658658/blog/484298