关闭tomcat Log文件 catalina.out的方法

23 views
Skip to first unread message

young

unread,
Sep 22, 2009, 10:57:57 PM9/22/09
to 工作记录
so in catalina.sh I do this

...start >> catalina.out 2>&1 & --replaced with

..start |cronolog /tomcat/logs/%Y-%M-%D.catalina.out >> /dev/null 2>&1
&

young

unread,
Sep 22, 2009, 11:05:42 PM9/22/09
to 工作记录
I still think a simple kludge is to pipe to a program.
In catalina.sh, change:
>> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
to
> more 2>&1 &

In place of more - put your favorite log rotation script.

For windows - it might be a bit trickier.


form http://marc.info/?t=105544472600001&r=1&w=2

young

unread,
Sep 22, 2009, 11:11:10 PM9/22/09
to 工作记录
整理一下:

在 catalina.sh中作如下替换:


...start >> catalina.out 2>&1 &

一行替换为:

young

unread,
Sep 22, 2009, 11:17:50 PM9/22/09
to 工作记录
Reply all
Reply to author
Forward
0 new messages