summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2022-07-05 15:04:29 (GMT)
committerGitHub <noreply@github.com>2022-07-05 15:04:29 (GMT)
commit3287e45847a4d471e20425f0da5194ac5735e16c (patch)
tree527cf60e4b723a503f47c803c38599b01f9e5c7c /Doc/library
parent5bd56a030ddf19052f23194e7ff95b4b9144f94f (diff)
downloadcpython-3287e45847a4d471e20425f0da5194ac5735e16c.zip
cpython-3287e45847a4d471e20425f0da5194ac5735e16c.tar.gz
cpython-3287e45847a4d471e20425f0da5194ac5735e16c.tar.bz2
[3.10] bpo-46755: Don't log stack info twice in QueueHandler (GH-31355) (GH-94565)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/logging.handlers.rst14
1 files changed, 12 insertions, 2 deletions
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index a5b181e..1447cab 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -1034,8 +1034,12 @@ possible, while any potentially slow operations (such as sending an email via
method is enqueued.
The base implementation formats the record to merge the message,
- arguments, and exception information, if present. It also
- removes unpickleable items from the record in-place.
+ arguments, exception and stack information, if present. It also removes
+ unpickleable items from the record in-place. Specifically, it overwrites
+ the record's :attr:`msg` and :attr:`message` attributes with the merged
+ message (obtained by calling the handler's :meth:`format` method), and
+ sets the :attr:`args`, :attr:`exc_info` and :attr:`exc_text` attributes
+ to ``None``.
You might want to override this method if you want to convert
the record to a dict or JSON string, or send a modified copy
@@ -1047,7 +1051,13 @@ possible, while any potentially slow operations (such as sending an email via
want to override this if you want to use blocking behaviour, or a
timeout, or a customized queue implementation.
+ .. attribute:: listener
+ When created via configuration using :func:`~logging.config.dictConfig`, this
+ attribute will contain a :class:`QueueListener` instance for use with this
+ handler. Otherwise, it will be ``None``.
+
+ .. versionadded:: 3.12
.. _queue-listener: