On 2024/01/29 20:28:05 Aryeh Friedman wrote:
> We need to shrink the size of catalina.out but looking at the logging
> documentation I do not see any way to do this with the standard
> logging.properties (or else where).   Due to the nature of the
> production site we never bring it completely down unless we must (life
> critical 24/7/365)
> 
> Specifically we have a fair number of System.out.println's with
> debugging information to it and we dumb stack traces into it also.
> And without stopping and restarting tomcat we want to make it so there
> is periodic rotation of catalina.out to some other file?   (note stack
> traces do go to the dated one but not the System.out.println's)

If you use the FreeBSD port, it will automatically use commons-daemon. JSVC 
does support SIGUSR1 with reopening logs: 
https://github.com/apache/commons-daemon/blob/6a95175ba875977a59fa4be2e99d80d2fa8d053a/src/native/unix/native/jsvc-unix.c#L124-L127
Then, you can use newsyslogd to rotate with SIGUSR1.  This works for me for 
ages now:
/usr/local/ldadocgen/prod/tomcat-1/logs/catalina.out    ldadocgen:ldadocgen    
0640    30    *    @T00    GBXP    /var/run/tomcat_ldadocgen_prod_1.pid    
SIGUSR1

Michael

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

Reply via email to