Kaydet (Commit) 3970c111 authored tarafından Vinay Sajip's avatar Vinay Sajip

Add exception handling for BaseRotatingFileHandler (SF #979252)

üst 4bbab2bd
...@@ -58,9 +58,12 @@ class BaseRotatingHandler(logging.FileHandler): ...@@ -58,9 +58,12 @@ class BaseRotatingHandler(logging.FileHandler):
Output the record to the file, catering for rollover as described Output the record to the file, catering for rollover as described
in doRollover(). in doRollover().
""" """
if self.shouldRollover(record): try:
self.doRollover() if self.shouldRollover(record):
logging.FileHandler.emit(self, record) self.doRollover()
logging.FileHandler.emit(self, record)
except:
self.handleError(record)
class RotatingFileHandler(BaseRotatingHandler): class RotatingFileHandler(BaseRotatingHandler):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment