473,388 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

exceptions from logging on Windows

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

Sep 12 '05 #1
1 2349
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)

Sep 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeremy Fincher | last post by:
I've just converted my application to use the logging module for its logging needs (it's quite excellent, actually :)). One thing I still have to resolve, though: in many places in my application,...
33
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. ...
6
by: Flare | last post by:
Hi i just read: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/exceptdotnet.asp Wich is interesting reading by the way. But. I have'nt used exception very much to...
16
by: Einar Høst | last post by:
Hi, I'm getting into the Trace-functionality in .NET, using it to provide some much-needed logging across dlls in the project we're working on. However, being a newbie, I'm wondering if some...
4
by: ___Newbie___ | last post by:
Hello, Does every error encountered during try() block is handled by catch(Exception e) ? Do I have to catch every aspect or every detail of exception? e.g. catch (IOException io) catch...
4
by: Asfand Yar Qazi | last post by:
Consider the following operation: class C { public: ... virtual void override_me() = 0; struct AnException : public std::runtime_error { AnException(const std::string& arg)
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
6
by: Liming | last post by:
Hi, In a typical 3 tier model (view layer, busines layer and data access layer) where do you handle your exceptions? do you let it buble up all the way to the .aspx pages or do you handle it in...
4
by: Alexandru Mosoi | last post by:
why doesn't logging throw any exception when it should? how do I configure logging to throw exceptions? .... logging.fatal('asdf %d', '123') .... except: .... print 'this line is never...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.