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

Reply via email to