Close Tomcat's Access_log
After building the Tomcat server, running a period of time will generate a large number of logs, resulting in insufficient disk space, when looking for analysis found "Localhost_access_log" log occupies a lot of space, view the contents of the log found that the log is the client's access information, This includes information such as client IP, time, access to resources, and so on.
10.11.2.3 10.11.2.13--[17/nov/2015:17:20:43 +0800] "get/http/1.1" 200 11418
You can turn off logging when the log is not needed:
Found in Server.xml:
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
prefix= "Localhost_access_log" suffix= ". txt"
pattern= "%{x-forwarded-for}i%h%l%u%t "%r" %s%b "/>
To comment out this paragraph:
<!--
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
prefix= "Localhost_access_log" suffix= ". txt"
pattern= "%{x-forwarded-for}i%h%l%u%t "%r" %s%b "/>
-
Restart the Tomcat service after saving, without worrying about the lack of space.
This article is from the "humble Words" blog, please be sure to keep this source http://fhjx1234.blog.51cto.com/1022919/1713608
Close Tomcat's Access_log