catalina.out与Tomcat 6.0一起滚动 [英] catalina.out rolling with Tomcat 6.0

查看:121
本文介绍了catalina.out与Tomcat 6.0一起滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个默认的tomcat安装,没有更改日志记录配置.日志文件(尤其是catalina.out)似乎已正确滚动(每天).

I have a default tomcat installation with no change to the logging configuration. The log files (in particular catalina.out) appear to be getting rolled (daily) correctly.

不过,除了每日日志外,还有一个catalina.out文件,该文件还在继续增长.这是我需要解决的问题,即每天将其清除(或尽可能将其彻底清除)

However as well as the daily logs there is also a catalina.out file, which just continues to grow. This is what I need to fix, ie have it cleared daily (or remove it altogether if possible)

有人可以解释这里发生了什么以及控制该日志文件大小的最佳最佳策略吗?

Can someone explain what is going on here and the best best strategy for controlling that log file size?

只是为了澄清输出是同时写入catalina.out和每日日志

Just to clarify the output is being written to catalina.out and the daily log simultaneously

-rw-r--r--  1 solr solr   90920663 Jul 18 01:16 logs/catalina.2009-07-18.log
-rw-r--r--  1 solr solr     238010 Jul 18 01:16 logs/catalina.out

设置swallowOutput似乎没有任何作用.

Setting swallowOutput appears to not make any difference.

在相关情况下在tomcat下运行的应用程序是solr.

The application being run under tomcat is solr in case that is relevant.

推荐答案

将其修复后,标准的日志记录配置定义了文件记录器和控制台记录器.文件记录器转到日常的catalina日志,控制台记录器将记录到catalina.out.

Fixed it, turns out the standard logging configuration defines a file logger and also a console logger. The file logger goes to the daily catalina log, and the console logger writes to catalina.out.

修正了conf/logging.properties的更改:

Fix was to change in conf/logging.properties:

.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.FileHandler

这将阻止任何内容写入catalina.out

That stops anything getting written to catalina.out

这篇关于catalina.out与Tomcat 6.0一起滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆