tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Clearing the catalina.out file
Date Mon, 24 Aug 2009 15:08:25 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

George,

On 8/14/2009 3:21 PM, George Sexton wrote:
> Here's what I originally wrote and Chris responded to:
> 
>> In Unix, if you erase a file that's still open, that file will be
>> removed from the directory but it will exist and consume space
>> until the application closes it. The holding application can
>> continue to put data in it. So, if you want to reset catalina.out
>> you need to re-start tomcat.
> 
> You'll note that what I wrote about erasing files is exactly in line
> with what you just wrote.
> 
> Chris responded with:
> 
>>> So, if you want to reset catalina.out you need to re-start
>>> tomcat.
> 
>> No, you don't. Why do people make statements like this? You can try
>> it yourself. It takes like 5 seconds:

Yes, I did say that. I was taking issue with the statement that
catalina.out could not be "reset" (which, in this context, means "remove
the old log entries") without restarting Tomcat. I called BS and showed
you a way to demonstrate that your statement was not accurate.

You're right: I could have explained the cute shell tricks, but that
would have dragged-out an already long discussion that apparently I'm
continuing to drag-out (apologies to all). Truncating a file is easy
from certain shells (bash, in my case), and a C-based example would have
been even more esoteric. I suppose Java would have worked, too.

> His exasperation clearly comes through and the explanation of why I
> need to try it isn't present. I hope that Chris can answer lots of
> questions, because quite frankly with his approach no one's going to
> want to participate after the 2nd or 3rd time they get their crap
> jumped in like this.

I tried to illustrate with as little irritation to readers as possible
what could be done, here. Without having to install logrorate, configure
it, and wait around for the interval to pass by to see that, in fact,
the file would be truncated and rotated.

In the future, I'll endeavor to avoid jumping into your crap.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqSrOkACgkQ9CaO5/Lv0PDHMgCguWjo6sxdlBuhh9L69uloSEHG
RikAn18N0Pa2TsM8egBcI9kN5TH2Zj+B
=YXYy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message