解决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即可