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

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



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

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




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.