exceptions from logging on Windows

Discussion in 'Python' started by Oliver Eichler, Sep 12, 2005.

  1. 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
     
    Oliver Eichler, Sep 12, 2005
    #1
    1. Advertising

  2. 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)
     
    Simon Dahlbacka, Sep 12, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VisionSet

    Exceptions or logging?

    VisionSet, Jun 18, 2004, in forum: Java
    Replies:
    3
    Views:
    352
    Jacob
    Jun 21, 2004
  2. Ahmed Moustafa
    Replies:
    5
    Views:
    30,124
    Chris Smith
    Jul 14, 2004
  3. Paul Miller
    Replies:
    3
    Views:
    1,064
    Alex Martelli
    Nov 12, 2003
  4. Replies:
    3
    Views:
    634
    Sherm Pendley
    Apr 16, 2007
  5. Lie
    Replies:
    3
    Views:
    711
Loading...

Share This Page