mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Write log with single syscall
This commit is contained in:
parent
5070533a0b
commit
390240c35a
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue