]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-107028: tiny textual changes in logging docs and docstrings (GH-107029...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 22 Jul 2023 21:12:06 +0000 (14:12 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2023 21:12:06 +0000 (22:12 +0100)
(cherry picked from commit 5e5a34ac3a827e040cd89426b1774fec2123336a)

Doc/library/logging.handlers.rst
Lib/logging/handlers.py

index 7f638251602c721928a2b861e04e6ad87f84fb7d..d1566957e7ed1485e102d72407f8c2221f6c88fb 100644 (file)
@@ -917,8 +917,9 @@ should, then :meth:`flush` is expected to do the flushing.
 
    .. method:: flush()
 
-      You can override this to implement custom flushing behavior. This version
-      just zaps the buffer to empty.
+      For a :class:`BufferingHandler` instance, flushing means that it sets the
+      buffer to an empty list. This method can be overwritten to implement more useful
+      flushing behavior.
 
 
    .. method:: shouldFlush(record)
@@ -950,9 +951,9 @@ should, then :meth:`flush` is expected to do the flushing.
 
    .. method:: flush()
 
-      For a :class:`MemoryHandler`, flushing means just sending the buffered
+      For a :class:`MemoryHandler` instance, flushing means just sending the buffered
       records to the target, if there is one. The buffer is also cleared when
-      this happens. Override if you want different behavior.
+      buffered records are sent to the target. Override if you want different behavior.
 
 
    .. method:: setTarget(target)
index f5a9760fd496b6befcc55d8991e56d0a612f73c3..eadd1b6340bcb66efd58e00ec50b6a15f2d2631b 100644 (file)
@@ -1399,7 +1399,7 @@ class MemoryHandler(BufferingHandler):
         records to the target, if there is one. Override if you want
         different behaviour.
 
-        The record buffer is also cleared by this operation.
+        The record buffer is only cleared if a target has been set.
         """
         self.acquire()
         try: