summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.handlers.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2019-07-01 11:41:21 (GMT)
committerGitHub <noreply@github.com>2019-07-01 11:41:21 (GMT)
commit84de34e39eb9e49b2ae691c6f67df8d7da3561de (patch)
treee85fce4db616ce1392ef37a287b68319b8d1eb04 /Doc/library/logging.handlers.rst
parent4a2edc34a405150d0b23ecfdcb401e7cf59f4650 (diff)
downloadcpython-84de34e39eb9e49b2ae691c6f67df8d7da3561de.zip
cpython-84de34e39eb9e49b2ae691c6f67df8d7da3561de.tar.gz
cpython-84de34e39eb9e49b2ae691c6f67df8d7da3561de.tar.bz2
bpo-32934: Clarified meaning of 'capacity' for BufferingHandler and MemoryHandler. (GH-14498)
Diffstat (limited to 'Doc/library/logging.handlers.rst')
-rw-r--r--Doc/library/logging.handlers.rst16
1 files changed, 9 insertions, 7 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 703d66d..df5bfef 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -861,7 +861,8 @@ should, then :meth:`flush` is expected to do the flushing.
.. class:: BufferingHandler(capacity)
- Initializes the handler with a buffer of the specified capacity.
+ Initializes the handler with a buffer of the specified capacity. Here,
+ *capacity* means the number of logging records buffered.
.. method:: emit(record)
@@ -885,12 +886,13 @@ should, then :meth:`flush` is expected to do the flushing.
.. class:: MemoryHandler(capacity, flushLevel=ERROR, target=None, flushOnClose=True)
Returns a new instance of the :class:`MemoryHandler` class. The instance is
- initialized with a buffer size of *capacity*. If *flushLevel* is not specified,
- :const:`ERROR` is used. If no *target* is specified, the target will need to be
- set using :meth:`setTarget` before this handler does anything useful. If
- *flushOnClose* is specified as ``False``, then the buffer is *not* flushed when
- the handler is closed. If not specified or specified as ``True``, the previous
- behaviour of flushing the buffer will occur when the handler is closed.
+ initialized with a buffer size of *capacity* (number of records buffered).
+ If *flushLevel* is not specified, :const:`ERROR` is used. If no *target* is
+ specified, the target will need to be set using :meth:`setTarget` before this
+ handler does anything useful. If *flushOnClose* is specified as ``False``,
+ then the buffer is *not* flushed when the handler is closed. If not specified
+ or specified as ``True``, the previous behaviour of flushing the buffer will
+ occur when the handler is closed.
.. versionchanged:: 3.6
The *flushOnClose* parameter was added.