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

    AGAGIN Periodic Rotating File Handler does not rotate daily

    cyron

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

       

      https://community.jboss.org/message/623410#623410

      https://community.jboss.org/message/799672

       

      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.