[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-17 Thread Vinay Sajip
Vinay Sajip added the comment: Closing, as no feedback received. Please feel free to reopen when you have the answer to my question! -- resolution: -> invalid status: pending -> closed ___ Python tracker

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread Vinay Sajip
Vinay Sajip added the comment: Hi Victor, A couple of points: 1. On Windows, you can't rename files which are open, so the strategy of closing after renaming doesn't work. 2. Using the alternative strategy (on failure, open the file with the current mode, else open with 'w') - if the except

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread STINNER Victor
STINNER Victor added the comment: I forgot something: to avoid trying to file rotation at each log message, the rotation should be disabled at the first error. For RotatingFileHandler, it can be something like: try: ... except: self.maxBytes=0 raise For TimedRotatingFileHandler, a fla

[issue8034] logging: Improve error handing in RotatingFileHandler.doRollover()

2010-03-01 Thread STINNER Victor
New submission from STINNER Victor : My server is running as root and is writing logs into /var/log/nucentral.log. I tried to run it under a different user ("nucentral"), and I changed /var/log/nucentral.log file permissions. I'm using: MAX_LOG_FILESIZE = 5 * 1024 * 1024 MAX_LOG_FILES =