summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorJosh Snyder <hashbrowncipher@users.noreply.github.com>2018-10-23 06:48:38 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2018-10-23 06:48:38 (GMT)
commitb7d62050e7d5fc208ae7673613da4f1f2bc565c4 (patch)
treeab4ee52caca79657424f15981cc0661c37926202 /Lib/logging
parent3b0047d8e982b10b34ab05fd207b7d513cc1188a (diff)
downloadcpython-b7d62050e7d5fc208ae7673613da4f1f2bc565c4.zip
cpython-b7d62050e7d5fc208ae7673613da4f1f2bc565c4.tar.gz
cpython-b7d62050e7d5fc208ae7673613da4f1f2bc565c4.tar.bz2
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042)
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 58afcd2..b4659af 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -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)