tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: rotate catalina.out without restart?
Date Tue, 02 Feb 2016 14:17:55 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Harald,

On 2/2/16 3:06 AM, Harald Dunkel wrote:
> Hi Christopher,
> 
> On 02/01/2016 05:07 PM, Christopher Schultz wrote:
>> Harald,
>> 
>> On 2/1/16 10:42 AM, Harald Dunkel wrote:
>>> would it be possible to integate apache's rotatelogs into 
>>> catalina.sh to support daily rotation of catalina.out without 
>>> restart?
>> 
>> Nope.
>> 
> 
> :-(.
> 
>>> This would be #1 on my wish list for version 9.
>> 
>> If you use the Tomcat startup scripts, the shell is responsible
>> for output redirection. Hacking that to pipe-through an external
>> program (eg. chronolog, etc.) is possible but makes the scripts
>> very complicated .
> 
> OK, then the question is why does catalina.sh write to
> catalina.out at all? stdout/stderr of the script would be
> sufficient. Writing to a hard wired log file without rotation is
> the worst option of all (even if you can choose the file name).

When you run "bin/catalina.sh start" you are implicitly requesting
your stdout/stderr be redirected. If you don't want that to happen,
don't run it that way.

Try this:

$ bin/catalina.sh start | whatever_you_want

>> If you want to rotate stdout/stderr logs, you should use jsvc or
>> some other service-runner; they will know how to rotate those
>> files. For example, jsvc can rotate those files when it receives
>> a signal.
>> 
> 
> Will this make catalina.out obsolete?

If you use jsvc, catalina.out is not a factor at all. The state of its
obsolescence is up to you.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlawupMACgkQ9CaO5/Lv0PDuVACgo8NsBHw1sSvF9VZHB8O4+wIJ
314AnAspyFr8IEMyLlBc+0Pz/+Zoh/bw
=b8e0
-----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