bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)
This commit is contained in:
parent
3b0047d8e9
commit
b7d62050e7
|
@ -1091,8 +1091,8 @@ class StreamHandler(Handler):
|
|||
try:
|
||||
msg = self.format(record)
|
||||
stream = self.stream
|
||||
stream.write(msg)
|
||||
stream.write(self.terminator)
|
||||
# issue 35046: merged two stream.writes into one.
|
||||
stream.write(msg + self.terminator)
|
||||
self.flush()
|
||||
except Exception:
|
||||
self.handleError(record)
|
||||
|
|
Loading…
Reference in New Issue