每次启动Tomcat 6.0.44时,如果此文件不存在,则会创建一个空的日志文件,其名称类似于 juli.2015-09-05.log 。在没有Tomcat启动的情况下,它不会成为当天的juli.yyyy-MM-dd.log文件。
有关此日志文件创建原因的一些解释?我没有配置它!
如何摆脱这个空的日志文件?
CLI:
/usr/bin/java -Djava.util.logging.config.file=/home/koala/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Dfile.encoding=UTF8 -Djava.endorsed.dirs=/home/koala/tomcat6/endorsed -classpath /home/koala/tomcat6/bin/bootstrap.jar:/home/koala/tomcat6/bin/tomcat-juli.jar -Dcatalina.base=/home/koala/tomcat6 -Dcatalina.home=/home/koala/tomcat6 -Djava.io.tmpdir=/home/koala/tomcat6/temp org.apache.catalina.startup.Bootstrap start
/home/koala/tomcat6/conf/logging.properties:
handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
.handlers = 1catalina.org.apache.juli.FileHandler
1catalina.org.apache.juli.FileHandler.level = FINEST
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
答案 0 :(得分:0)
您是否注释掉了不必要的日志? 它应该从“处理程序”中排除。
handlers = 1catalina.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.FileHandler.prefix = catalina.
# 2localhost.org.apache.juli.FileHandler.level = FINE
# 2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
# 2localhost.org.apache.juli.FileHandler.prefix = localhost.