Remove __del__ because the order of del is not guaranteed.
Sometimes the streamhandler is garbage collected before the loghandler, in which case this makes a bad error.
This commit is contained in:
parent
6c0233c239
commit
f10942fd3f
1 changed files with 0 additions and 5 deletions
|
@ -106,11 +106,6 @@ class LogHandler(vlogging.StreamHandler):
|
|||
self.notify_every_line = notify_every_line
|
||||
super().__init__(stream=self.log_buffer)
|
||||
|
||||
def __del__(self):
|
||||
# Remember that del is not guaranteed to execute, but this should help
|
||||
# out in cases where notify is never called.
|
||||
self.notify()
|
||||
|
||||
def emit(self, record):
|
||||
# The StreamHandler emit will write the line into the stringio buffer.
|
||||
super().emit(record)
|
||||
|
|
Loading…
Reference in a new issue