mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
[3.11] gh-107028: tiny textual changes in logging docs and docstrings (GH-107029) (GH-107066)
(cherry picked from commit 5e5a34ac3a
)
This commit is contained in:
parent
2895dbd0f6
commit
9875b177a9
2 changed files with 6 additions and 5 deletions
|
@ -917,8 +917,9 @@ should, then :meth:`flush` is expected to do the flushing.
|
||||||
|
|
||||||
.. method:: flush()
|
.. method:: flush()
|
||||||
|
|
||||||
You can override this to implement custom flushing behavior. This version
|
For a :class:`BufferingHandler` instance, flushing means that it sets the
|
||||||
just zaps the buffer to empty.
|
buffer to an empty list. This method can be overwritten to implement more useful
|
||||||
|
flushing behavior.
|
||||||
|
|
||||||
|
|
||||||
.. method:: shouldFlush(record)
|
.. method:: shouldFlush(record)
|
||||||
|
@ -950,9 +951,9 @@ should, then :meth:`flush` is expected to do the flushing.
|
||||||
|
|
||||||
.. method:: flush()
|
.. 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
|
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)
|
.. method:: setTarget(target)
|
||||||
|
|
|
@ -1399,7 +1399,7 @@ class MemoryHandler(BufferingHandler):
|
||||||
records to the target, if there is one. Override if you want
|
records to the target, if there is one. Override if you want
|
||||||
different behaviour.
|
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()
|
self.acquire()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue