Message20558
Logged In: YES
user_id=31435
Windows is unique in that it will not allow renaming (or
deleting) a file that's open. I expect that by calling refresh()
all the time, you're creating additional new objects that have
C:\log.txt open, so that it's impossible for rollover to rename
C:\log.txt on Windows. There's nothing the logging package
can do about that.
You're also adding an endless number of redundant handlers
to the same logger. Try this:
1. In your __init__ method, set
self.logger = None
2. Start your refresh() method with
if self.logger is not None:
self.rotatingFileLogHandler.close()
self.logger.removeHandler(self.rotatingFileLogHandler)
Closing the old handler arranges to close the C:\log.txt file, so
that it's *possible* to rename it on Windows. Removing the
old handler from the logger should prevent seeing an
unpredictable number of copies of individual log msgs, and
probably prevent some "I/O operation on closed file" screwups
too. |
|
Date |
User |
Action |
Args |
2007-08-23 14:21:08 | admin | link | issue939836 messages |
2007-08-23 14:21:08 | admin | create | |
|