summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-10-20 20:34:09 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-10-20 20:34:09 (GMT)
commit05ed69590bf9ab4907c070c82d2490fb6df4978c (patch)
treed36161247882c67dae784f1ceafed04d1798898d /Doc
parent2a20dfc2aabc3259d5b4276eeec91f83230fdcac (diff)
downloadcpython-05ed69590bf9ab4907c070c82d2490fb6df4978c.zip
cpython-05ed69590bf9ab4907c070c82d2490fb6df4978c.tar.gz
cpython-05ed69590bf9ab4907c070c82d2490fb6df4978c.tar.bz2
logging: Improved StreamHandler documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.rst24
1 files changed, 13 insertions, 11 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 0148ea9..cb613ce 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -2100,6 +2100,11 @@ and :meth:`flush` methods).
:meth:`close` method is inherited from :class:`Handler` and so does
no output, so an explicit :meth:`flush` call may be needed at times.
+.. 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.
.. _file-handler:
@@ -3072,14 +3077,14 @@ You don't actually need to subclass ``Filter``: you can pass any instance
which has a ``filter`` method with the same semantics.
.. versionchanged:: 3.2
-
-You don't need to create specialized ``Filter`` classes, or use other classes
-with a ``filter`` method: you can use a function (or other callable) as a
-filter. The filtering logic will check to see if the filter object has a
-``filter`` attribute: if it does, it's assumed to be a ``Filter`` and its
-:meth:`~Filter.filter` method is called. Otherwise, it's assumed to be a
-callable and called with the record as the single parameter. The returned
-value should conform to that returned by :meth:`~Filter.filter`.
+ You don't need to create specialized ``Filter`` classes, or use other
+ classes with a ``filter`` method: you can use a function (or other
+ callable) as a filter. The filtering logic will check to see if the filter
+ object has a ``filter`` attribute: if it does, it's assumed to be a
+ ``Filter`` and its :meth:`~Filter.filter` method is called. Otherwise, it's
+ assumed to be a callable and called with the record as the single
+ parameter. The returned value should conform to that returned by
+ :meth:`~Filter.filter`.
Other uses for filters
^^^^^^^^^^^^^^^^^^^^^^
@@ -3160,9 +3165,6 @@ wire).
messages, whose ``__str__`` method can return the actual format string to
be used.
- .. versionchanged:: 2.5
- *func* was added.
-
.. _logger-adapter:
LoggerAdapter Objects