Why doesn't my rolling logfile roll?
Hello!I got this issue on my desk. A customer have an app running in a WmVare environment at Windows server.
The logging of the app is configured with log4j. The idea is that the logfile should be rolling when the size reach 5000Kb for 10 times. Then the file will be written over again.
But we just got 1 file that rolls when it reach the size, no backups of 1-10.
To me the config look ok.
<appender name="BUSINESS-ROLLINGFILE-THEAPP" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="logs/theapp.log"/>
<param name="Append" value="true"/>
<param name="MaxFileSize" value="5000KB"/>
<param name="MaxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{ISO8601} %-5p %.25c{1}->%.25M - %m%n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="info" />
<param name="LevelMax" value="warn" />
<param name="AcceptOnMatch" value="true" />
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
</appender>
I heard a rumour, that this might have to do beacause of some file lock in Windows, perhaps a bug.
So if any one see anything strange in the config, please let us now!
Best regards
Fredrik
