This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kmk
Recipients kmk
Date 2008-01-15.21:30:06
SpamBayes Score 0.0212301
Marked as misclassified No
Message-id <1200432609.46.0.111117657939.issue1836@psf.upfronthosting.co.za>
In-reply-to
Content
Log file did not 'rotate' on day requested.
Fixed code in Lib/logging/handlers.py class TimedRotatingFileHandler
Compare excerpt of my fix below to the original

# Case 2) The day to rollover is further in the interval (i.e., today is
#         day 2 (Wednesday) and rollover is on day 6 (Sunday).  Days to
#         next rollover is simply 6 - 2, or 4.
# Case 3) The day to rollover is behind us in the interval (i.e., today
#         is day 5 (Saturday) and rollover is on day 3 (Thursday).
#         Days to rollover is 6 - 5 + 3 + 1, or 5.  In this case, it's 
the
#         number of days left in the current week (1) plus the number
#         of days in the next week until the rollover day (4).
if when.startswith('W'):
   day = t[6] # 0 is Monday
   if self.dayOfWeek > day:
       daysToWait = (self.dayOfWeek - day)
       self.rolloverAt = self.rolloverAt + (daysToWait * (60 * 60 * 24))
   if self.dayOfWeek < day:
       daysToWait = (6 - day) + self.dayOfWeek + 1
History
Date User Action Args
2008-01-15 21:30:09kmksetspambayes_score: 0.0212301 -> 0.0212301
recipients: + kmk
2008-01-15 21:30:09kmksetspambayes_score: 0.0212301 -> 0.0212301
messageid: <1200432609.46.0.111117657939.issue1836@psf.upfronthosting.co.za>
2008-01-15 21:30:08kmklinkissue1836 messages
2008-01-15 21:30:06kmkcreate