I use the following configurations in my log4j.properties file:

log4j.appender.abc=org.apache.log4j.RollingFileApp ender

log4j.appender.abc.file=/opt/wasprofile/appsrv/logs/abc/abc.log

log4j.appender.abc.append=true

log4j.appender.abc.layout=org.apache.log4j.Pattern Layout

log4j.appender.abc.layout.ConversionPattern=%x %p %d{ISO8601} - %m%n

log4j.appender.abc.MaxFileSize=3MB

log4j.appender.abc.MaxBackupIndex=4

log4j.appender.abc.fileNamePattern=abc%i.log

Since the MaxFileSize is set to 3MB and MaxBackupIndex is set to 4, the log rotation happens when the abc.log reaches 3MB and 4 logs are created namely, abc.log.1, abc.log.2, abc.log.3, and abc.log.4. The logs keep rotating fine for a while. Then all of a sudden, these 4 log files get backed up with a timestamp appended to their names, and a fresh set of these 4 log files are created. Why does this happen? I want these 4 log files to keep rotating indefinitely.