]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-107028: tiny textual changes in logging docs and docstrings (GH-107029)
authorJochem Boersma <jochem.boersma@witteveenbos.com>
Sat, 22 Jul 2023 20:43:18 +0000 (22:43 +0200)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2023 20:43:18 +0000 (21:43 +0100)
Doc/library/logging.handlers.rst
Lib/logging/handlers.py

index 47bfe4ff7f90ed20ad7a5e19ad37409b1ac69090..72e5ffb3a1218e4a1d94d80d69aee2a841b33c09 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 9847104446eaf6390486c6cec792f3b82691fe1b..671cc9596b02dd4068eb5de1aade13d23593dbcc 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: