bugfix
This commit is contained in:
parent
b1ef9e4b1f
commit
b7205121bd
Binary file not shown.
@ -75,10 +75,12 @@ class MyLogger:
|
|||||||
self.logger = None
|
self.logger = None
|
||||||
if fh is None:
|
if fh is None:
|
||||||
fh = self._get_logger()
|
fh = self._get_logger()
|
||||||
|
item = item[:4096]
|
||||||
fh.write(item)
|
fh.write(item)
|
||||||
|
fh.flush()
|
||||||
# Only flush on critical/exception to avoid blocking on slow disks
|
# Only flush on critical/exception to avoid blocking on slow disks
|
||||||
if item.find('[exception]') >= 0 or item.find('[critical]') >= 0:
|
#if item.find('[exception]') >= 0 or item.find('[critical]') >= 0:
|
||||||
fh.flush()
|
# fh.flush()
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
# Periodic flush to prevent data loss on crash
|
# Periodic flush to prevent data loss on crash
|
||||||
if fh is not None:
|
if fh is not None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user