In the except part you call self.handleError(None). This does not work, I see this:
File "/usr/lib64/python2.7/logging/init.py", line 821, in handleError
record.filename, record.lineno))
AttributeError: 'NoneType' object has no attribute 'filename'
it is unclear to me if it is allowed to call handleError() here at all. But if it is allowed you should pass an "empty" LogRecord instead of None.
(I know this is Python 2.7 and should be updated to 3.x where exception handling in the LogHandlers has changed but a bug is a bug...)
In the except part you call self.handleError(None). This does not work, I see this:
File "/usr/lib64/python2.7/logging/init.py", line 821, in handleError
record.filename, record.lineno))
AttributeError: 'NoneType' object has no attribute 'filename'
it is unclear to me if it is allowed to call handleError() here at all. But if it is allowed you should pass an "empty" LogRecord instead of None.
(I know this is Python 2.7 and should be updated to 3.x where exception handling in the LogHandlers has changed but a bug is a bug...)