tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: logrotate and tomcat 3.3/4.0/4.1
Date Mon, 29 Apr 2002 16:43:29 GMT
"GOMEZ Henri" <> wrote:

> Hi to all,
> Did there is plan to help implement logrotate
> for Tomcat 3.3/4.0/4.1 ?
> On production the logs could became very important
> after weeks of use and should be cleanup.
> The usual way under Unix is to use logrotate which
> generally send a KILL -HUP/USR1 to the process which in
> turn close its open logs files, and create new one.
> The logrotate daemon then do the cleanup, renaming,
> compression and so on.
> What's the perspective for tomcat's ?
> - Use log4j in cycle mode and avoid use
> of System.out / System.err ?
> - Team up with jakarta-service to be able to
> catch up the signal and do what's needed ?

However you do it (signal, http request, or daily "switch" as in Catalina),
you end up having to close a file descriptor, and opening another one... If
you want to delete the old log files (for instance) you need to make sure
that those are not open by the JVM process...  Therefore the best course of
action is doing like catalina does... Which already has a some-sort of
logrotate built in...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message