mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Add exception handling for BaseRotatingFileHandler (SF #979252)
This commit is contained in:
parent
4bbab2bde4
commit
3970c11157
1 changed files with 6 additions and 3 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue