summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndre Delfino <adelfino@gmail.com>2019-06-29 21:59:49 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2019-06-29 21:59:49 (GMT)
commit3e6583061cc7bc27305f17500dece8e43b9f4eab (patch)
treed70970942159b4e14db2b70814190ae3a2cdc2cf /Doc
parent18a2fc6f231049a9379823f768287678bb246a88 (diff)
downloadcpython-3e6583061cc7bc27305f17500dece8e43b9f4eab.zip
cpython-3e6583061cc7bc27305f17500dece8e43b9f4eab.tar.gz
cpython-3e6583061cc7bc27305f17500dece8e43b9f4eab.tar.bz2
Make StreamHandler.terminator more discoverable (GH-14359)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.handlers.rst18
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 4c1af7c..703d66d 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -48,7 +48,7 @@ and :meth:`flush` methods).
.. method:: emit(record)
If a formatter is specified, it is used to format the record. The record
- is then written to the stream with a terminator. If exception information
+ is then written to the stream followed by :attr:`terminator`. If exception information
is present, it is formatted using :func:`traceback.print_exception` and
appended to the stream.
@@ -70,13 +70,17 @@ and :meth:`flush` methods).
.. versionadded:: 3.7
+ .. attribute:: terminator
-.. versionchanged:: 3.2
- The ``StreamHandler`` class now has a ``terminator`` attribute, default
- value ``'\n'``, which is used as the terminator when writing a formatted
- record to a stream. If you don't want this newline termination, you can
- set the handler instance's ``terminator`` attribute to the empty string.
- In earlier versions, the terminator was hardcoded as ``'\n'``.
+ String used as the terminator when writing a formatted record to a stream.
+ Default value is ``'\n'``.
+
+ If you don't want a newline termination, you can set the handler instance's
+ ``terminator`` attribute to the empty string.
+
+ In earlier versions, the terminator was hardcoded as ``'\n'``.
+
+ .. versionadded:: 3.2
.. _file-handler: