8000 bpo-35046: do only one system call per line (logging.StreamHandler) (… · python/cpython@d730719 · GitHub
[go: up one dir, main page]

Skip to content

Commit d730719

Browse files
miss-islingtonvsajip
authored andcommitted
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) (GH-10050)
(cherry picked from commit b7d6205)
1 parent 313e501 commit d730719

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/logging/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,8 @@ def emit(self, record):
10331033
try:
10341034
msg = self.format(record)
10351035
stream = self.stream
1036-
stream.write(msg)
1037-
stream.write(self.terminator)
1036+
# issue 35046: merged two stream.writes into one.
1037+
stream.write(msg + self.terminator)
10381038
self.flush()
10391039
except Exception:
10401040
self.handleError(record)

0 commit comments

Comments
 (0)
0