Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > exceptions from logging on Windows

Reply
Thread Tools

exceptions from logging on Windows

 
 
Oliver Eichler
Guest
Posts: n/a
 
      09-12-2005
Hi,

I experience several exceptions from python's logging system when using the
rollover feature on Windows.

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

Googeling revealed that this has been experienced by others, too, however no
workaround or solution has been provided. Is this the latest status on this
topic? Do I miss something?

Thanks for help,

Oliver

 
Reply With Quote
 
 
 
 
Simon Dahlbacka
Guest
Posts: n/a
 
      09-12-2005
I ended up monkey-patching doRollover to do a number of retries before
giving up. (In our case the failures is due to our log browser
happening to read the latest changes when logging wants to rollover)

(Actually, I implemented a simple QueueHandler and do all file
operations from a different logging thread)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exceptions - How do you make it work like built-in exceptions? Lie Python 3 01-14-2008 06:45 PM
Exceptions + Performance on path without exceptions gratch06@gmail.com C++ 3 04-16-2007 08:52 PM
Checked exceptions vs unchecked exceptions Ahmed Moustafa Java 5 07-14-2004 01:46 PM
Exceptions or logging? VisionSet Java 3 06-21-2004 09:27 AM
Custom exceptions -- inherit from exceptions.Exception? Paul Miller Python 3 11-12-2003 09:24 AM



Advertisments