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

Skip to content

Commit b7d6205

Browse files
hashbrownciphervsajip
authored andcommitted
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)
1 parent 3b0047d commit b7d6205

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
@@ -1091,8 +1091,8 @@ def emit(self, record):
10911091
try:
10921092
msg = self.format(record)
10931093
stream = self.stream
1094-
stream.write(msg)
1095-
stream.write(self.terminator)
1094+
# issue 35046: merged two stream.writes into one.
1095+
stream.write(msg + self.terminator)
10961096
self.flush()
10971097
except Exception:
10981098
self.handleError(record)

0 commit comments

Comments
 (0)
0