Add exception handling for BaseRotatingFileHandler (SF #979252)

This commit is contained in:
Vinay Sajip 2004-07-08 10:24:04 +00:00
parent 4bbab2bde4
commit 3970c11157
1 changed files with 6 additions and 3 deletions

View File

@ -58,9 +58,12 @@ class BaseRotatingHandler(logging.FileHandler):
Output the record to the file, catering for rollover as described
in doRollover().
"""
if self.shouldRollover(record):
self.doRollover()
logging.FileHandler.emit(self, record)
try:
if self.shouldRollover(record):
self.doRollover()
logging.FileHandler.emit(self, record)
except:
self.handleError(record)
class RotatingFileHandler(BaseRotatingHandler):
"""