I have an issue with the DailyRollingFileAppender when generating monthly log files. Im using log4j version 1.2.8 but the same code is in 1.2.13. The log files are generated depending on when the DailyRollingFileAppender class get initialized. For example if the class is initialized at 10:45am on some date then the log files are not generated until 00:45am on first day of next month. I believe this is caused by the following code in the DailyRollingFileAppender.java file: public Date getNextCheckDate(Date now) { this.setTime(now); switch(type) { case DailyRollingFileAppender.TOP_OF_MONTH: this.set(Calendar.DATE, 1); this.set(Calendar.HOUR_OF_DAY, 0); this.set(Calendar.SECOND, 0); this.set(Calendar.MILLISECOND, 0); this.add(Calendar.MONTH, 1); break; ...} } It seems the 'MINUTE' attr is not set to zero: this.set(Calendar.MINUTE, 0); Could someone take a look at this. Thank you for your support, Manjit
Also would effect weekly rollovers. Committed revs 439183 (trunk) and 439184 (1.2 branch).
gfhg