Write log with single syscall
This commit is contained in:
@@ -166,8 +166,7 @@ class ThreadedStreamHandler(logging.Handler):
|
|||||||
if self._detect_journal(stream) and self._try_emit_journal(record):
|
if self._detect_journal(stream) and self._try_emit_journal(record):
|
||||||
return
|
return
|
||||||
msg = self.format(record)
|
msg = self.format(record)
|
||||||
stream.write(msg)
|
stream.write(msg + self.terminator)
|
||||||
stream.write(self.terminator)
|
|
||||||
if hasattr(stream, "flush"):
|
if hasattr(stream, "flush"):
|
||||||
stream.flush()
|
stream.flush()
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user