Yes, that was the issue. If it can't do the compression it should default to behaving as though the compression suffix is not there.
It would also be a better idea to use the zlib library instead of spawning out to command line apps. Linux users will most likely already have zlib installed. For Windoze you can use the dll version of zlib and if the dll isn't there don't do the compression. BTW, a documentation bug. The API documentation for TimeBasedRollingPolicy is missing the % sign before the d for specifying the FileNamePattern. It gives an example with: /wombat/folder/foo.d which should really be: /wombat/folder/foo.%d On Tue, Apr 29, 2008 at 1:31 PM, Curt Arnold <[EMAIL PROTECTED]> wrote: > > > > > On Apr 29, 2008, at 11:38 AM, Dale King wrote: > > > > I was testing out rolling file appenders (in Windows) which I set to > > rollover every minute so I can see what happens. Here is the appender: > > > > <appender name="xmlfile" > > class="org.apache.log4j.rolling.RollingFileAppender"> > > <param name="filename" value="log\log-current.xml"/> > > <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> > > <param name="FileNamePattern" value="log\log%d{HH_mm}.xml.zip"/> > > </rollingPolicy> > > <layout class="org.apache.log4j.XMLLayout"> > > <param name="properties" value="true"/> > > <param name="locationinfo" value="true"/> > > </layout> > > </appender> > > > > It works fine if the .zip is not on there. With the .zip on there at the > > top of the minute the file gets renamed to something like log12_30.xml (no > > zip extenstion) and no new file is created so there are no more logging > > events to the file system. I tried it without using a directory in the name > > and it still did it. > > > > -- > > Dale King > > > > Do you have a zip.exe on the path? Compression relies on either a gzip (if > the extension is .gz) or zip executable to be on the path. > > There is a zip utility in the Win32 API in the shell.lib if I recall, but > log4cxx does not attempt to use that. > > The behavior when zip or gzip is missing likely could be improved. > > -- Dale King