bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) (GH-10050)
(cherry picked from commit b7d62050e7
)
This commit is contained in:
parent
313e5015d2
commit
d730719b09
|
@ -1033,8 +1033,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