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.

-Tim

Eric J. Pinnell wrote:
I agree that developers should use good coding practices.  But they don't.
So as a sys-admin or an ops guy you have to rotate that file simply
because tomcat creates it.  If it wasn't there developers couldn't
use it and ops wouldn't have to rotate it.

My initial confusion was because it is basically a nohup.out file and if
you move the descriptor tomcat will write into no mans land.  This is
typical of a nohup.

It would be great if in a future release tomcat did the rotation
internally or did away with the file altogether.

-e

On Thu, 12 Jun 2003, Tim Funk wrote:


I have mixed feelings on catalina.out.

On one hand it should be allowed to rotate because it does get written to.

OTOH - After the startup message - nothing really should be written to it
without making an effort to do so. So only badly written code which uses
System.out/err will be the victim. This is the incentive to use a real
logging package. Allowing rotation allows reward of bad code.

OTOH - Adapting the startup scripts should be easy for a user to fix their
bad code in that they can pipe to a simple log rotation program instead of a
file.


-Tim ( Who's sympathetic because he's a victim of coders who use lots of System.out)

Shapira, Yoav wrote:

Howdy,
It seems you're right -- I hadn't looked at the code for a while.

This is why I suggested tomcat use the log4j file rollover mechanism,
which is very robust.  But I didn't get much positive feedback, and I
certainly don't have the bandwidth to do it myself right now...

Yoav Shapira
Millennium ChemInformatics




-----Original Message-----
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:24 PM
To: Tomcat Users List
Subject: RE: rotating catalina.out

what mechanism is that?

It looks like the logs are being held by an open file descriptor, so
rotating the catalina.out will just stop logging after the first

rotation,



since you cause an IOException in Tomcat.

filip



-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 1:12 PM
To: Tomcat Users List
Subject: RE: rotating catalina.out



Howdy,
Why not use the nightly rollover mechanism used for servlet logs,
localhost logs, etc. also for catalina.out?

Yoav Shapira
Millennium ChemInformatics




-----Original Message-----
From: Eric J. Pinnell [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:04 PM
To: Tomcat Users List
Subject: Re: rotating catalina.out

I was going to experiment with it next week. It would be nice to do

it



within Tomcat and stay away from the Unix-y stuff. That way it

would



also


work for the windows users.

I have a feeling the Unix-y stuff will have to suffice for a bit.

-e

On Thu, 12 Jun 2003, Filip Hanik wrote:



did anyone figure out how to rotate this bad boy and the

localhost_log



without shutting down tomcat?

Filip




---------------------------------------------------------------------



To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:

[EMAIL PROTECTED]



---------------------------------------------------------------------


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential
business communication, and may contain information that is
confidential, proprietary and/or privileged.  This e-mail is
intended only for the individual(s) to whom it is addressed, and
may not be saved, copied, printed, disclosed or used by anyone
else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and
notify the sender.  Thank you.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to