码上敲享录 > 互联网笔记 > 解决tomcat的catalina.out文件过大

解决tomcat的catalina.out文件过大

上一章章节目录下一章 2019-04-09已有2997人阅读 评论(0)

解决tomcat的catalina.out文件过大


解决方法:

1.修改tomcat的/bin/catalina.sh文件,注释CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out并添加CATALINA_OUT=/dev/null

if [ -z "$CATALINA_OUT" ] ; then

# CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out

CATALINA_OUT=/dev/null

fi


2.在tomcat的/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, 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.


3.重启tomcat即可


1

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交