Tomcat logging flush....

Codewiz

Diamond Member
Jan 23, 2002
5,758
0
76
I need to write a shell script that basically copies the catalina.out file to something like catalina.out.yyyymmdd

Then it needs to flush the contents of catalina.out.

I need to do this without restarting tomcat. Any ideas on how to do this without possibly causing problems with the logging capabilities.

It would be great if I could tell Tomcat to flush the log file when I run the script.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Is this the regular Tomcat log file? Mine rolls over automatically every day and stores the old one in a file named localhost_log.2005-mm-dd.txt

So I think you should be able to configure Tomcat to do it for you without using a shell script.
 

Codewiz

Diamond Member
Jan 23, 2002
5,758
0
76
Originally posted by: znaps
Is this the regular Tomcat log file? Mine rolls over automatically every day and stores the old one in a file named localhost_log.2005-mm-dd.txt

So I think you should be able to configure Tomcat to do it for you without using a shell script.

Wow, that would rock, I need to look to see how to configure that.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Are you sending your own logs to tomcat's log or are you just worried about the messages from the serer itself? I'm not real familiar with tomcat's logging and if it's working for you then there's no reason to change but I was just going to suggest log4j for your app. It's nice and easy to configure and would keep your logs seperate from tomcat's.

Damn google is smart! I see four ads below this thread and all four are for tomcat related products :shocked: