本文主要是介绍禁止向catalina.out写入日志文件,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
catalina.out与按天的catalina.xxxx.log重复,屏蔽catalina.out的方法
修改tomcat/conf/logging.properties
1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory = 日志目录
1catalina.org.apache.juli.FileHandler.prefix = catalina.
2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = 日志目录
2localhost.org.apache.juli.FileHandler.prefix = localhost.
3manager.org.apache.juli.FileHandler.level = FINE
3manager.org.apache.juli.FileHandler.directory = 日志目录
3manager.org.apache.juli.FileHandler.prefix = manager.
4host-manager.org.apache.juli.FileHandler.level = FINE
4host-manager.org.apache.juli.FileHandler.directory = 日志目录
4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
日志目录默认是:#${catalina.base}/logs
java.util.logging.ConsoleHandler.level = OFF #关掉
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
重启之后生效
版本:Centos7,Tomcat8
这篇关于禁止向catalina.out写入日志文件的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!