> -----Original Message----- > From: Göran Roseen [mailto:[EMAIL PROTECTED]
> True! > I have been thinking all along as new requests for features > in the rolling file appender comes in; "This should really be > done with logrotate", a Unix tool that is specialized in > rotating log files. > > Today I googled around a little, and to my astonishment I > realized that it seems like no one has made a windows port of > logrotate. Really strange! The best I could find is rotatelog, which is written in Perl and therefore may run on Windows with the help of ActiveState Perl. http://www.interhack.net/projects/rotatelog/ The main problem with this approach on Windows is that files open for writing are locked and cannot be renamed. On UNIX based file systems you can rename a file while it is locked and the application will continue to write to it. Typically after renaming the log file you would send the application a HUP signal to cause it to close the current log file and open a new log file with the original name. There is no standard way of signalling applications in Windows. Personally I think that the current RollingFileAppender is too complex and we would benefit greatly from a more pluggable approach similar to the new implementation in log4j: http://svn.apache.org/viewcvs.cgi/logging/log4j/trunk/src/java/org/apache/log4j/rolling/ At least with a plugin model it would be simpler for users to define their own behaviours when the out of the box solution does not fit. Cheers, Nicko
