"GOMEZ Henri" <[EMAIL PROTECTED]> 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... Pier -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>