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):
|
||||
return
|
||||
msg = self.format(record)
|
||||
stream.write(msg)
|
||||
stream.write(self.terminator)
|
||||
stream.write(msg + self.terminator)
|
||||
if hasattr(stream, "flush"):
|
||||
stream.flush()
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user