DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=38559>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=38559 Summary: Monthly logs not generated at midnight with DailyRollingFileAppender Product: Log4j Version: 1.2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: Appender AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] 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 -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
