0 Replies Latest reply on Jul 3, 2013 9:38 PM by cyron

    AGAGIN Periodic Rotating File Handler does not rotate daily

    cyron Newbie

      It had benn discussed many times, and been fixed long before.





      but from logmanager 1.4, this bug appears again.


      I checked the PeriodRotatingFileHandler, and found the problem:


      calendar.set(Calendar.HOUR, 0)


      Calendar.HOUR is setted to 0, butCalendar.AM_PM is remain untouched.

      so when you start server at afternoon, you will get the next ratation at next afternoon, instead of next middlenight.


      so calendar.set(Calendar.AM_PM, 0) should be added.


      in 1.3, it was calendar.clear(Calendar.HOUR) , it did't clear the am/pm either.

      IMHO because the hour value is cleared to undefined, am/pm is simply ignored.