Bug 55190 - RollingFileAppender not rolling over when reach MaxBackUpIndex=10
Summary: RollingFileAppender not rolling over when reach MaxBackUpIndex=10
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: unspecified
Hardware: PC AIX
: P2 critical
Target Milestone: ---
Assignee: log4j-dev
Depends on:
Reported: 2013-07-03 10:50 UTC by harshit
Modified: 2014-02-28 20:26 UTC (History)
1 user (show)

Configuration file and debug logs (1.32 KB, application/x-zip-compressed)
2013-07-05 07:01 UTC, harshit

Note You need to log in before you can comment on or make changes to this bug.
Description harshit 2013-07-03 10:50:52 UTC
In application, log4j is used for generating the logs. log4j is configured with RolloingAppender. Maximum rolling index is 10 and maximum file size is 10  MB.
after creating 10 backup files rollover is not happening and logs are not getting generated .

log4j Jar Version: log4j-1.2.14.jar
Application server version: IBM Websphere ND
JDK Version :JRE 1.6.0 IBM AIX build pap6460sr7-20091215_02
Sever Machine OS and Version : IBM AIX 6.1
Current Access Permission/level on log folder : drwxr-xr-x

Let me know if any other details are required or if we upgrade to higher version this issue will be resolve
Comment 1 harshit 2013-07-05 07:01:33 UTC
Created attachment 30536 [details]
Configuration file and debug logs

PFA configuartion file and digonosis log generated after enabling the log4j.debug=true in JVM arguments.
Comment 2 pmr 2014-02-28 11:14:16 UTC
We do have a similar one on Tomcat 7 tested on log4j 1.2 16&17. WIN 7 JDK 17_02 64bits
Easy to reproduce, simply put the LOG LEVEL on DEBUG on Tomcat startup, with MaxSize 1MB & MaxRollIndex 3.
It starts ok but after a while log.1 log.2 are deleted and the initial file is kept and keeps growing and growing...

Any clue would help
Comment 3 harshit 2014-02-28 20:26:37 UTC
we use ImmediateFlush=true as log4j property and increased the size of each logs.