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 mramahi77
Recipients mramahi77
Date 2008-12-26.12:46:43
SpamBayes Score 1.59324e-05
Marked as misclassified No
Message-id <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za>
In-reply-to
Content
It seems that RotatingFileHandler  is experiencing an issue when 
attempting to rotate log files under Windows. The following errors are 
received:

Traceback (most recent call last):
  File "C:\Python25\lib\logging\handlers.py", line 73, in emit
    if self.shouldRollover(record):
  File "C:\Python25\lib\logging\handlers.py", line 147, in 
shouldRollover
    self.stream.seek(0, 2)  #due to non-posix-compliant Windows feature
ValueError: I/O operation on closed file
Traceback (most recent call last):
  File "C:\Python25\lib\logging\handlers.py", line 73, in emit
    if self.shouldRollover(record):

I tried the code on Python 2.5.2 and 2.5.4 under Windows XP SP 2, with 
the same results. To reproduce run the attached scripts few times. The 
first time the handlers attempt to rotate the log files the error 
message above is received. 

In addition to crashing the application, log files are getting lost as 
a result, which is a serious issue. 

I have seen few complaints about this issue, but tickets were closed 
without a real resolution to the issue (unless I missed something)
History
Date User Action Args
2008-12-26 12:46:46mramahi77setrecipients: + mramahi77
2008-12-26 12:46:46mramahi77setmessageid: <1230295606.47.0.842082380856.issue4749@psf.upfronthosting.co.za>
2008-12-26 12:46:45mramahi77linkissue4749 messages
2008-12-26 12:46:44mramahi77create