summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2020-09-03 18:44:12 (GMT)
committerGitHub <noreply@github.com>2020-09-03 18:44:12 (GMT)
commitcdbff3527c5b10e79761ad25316b46cd079304bc (patch)
tree8821f304ce44c9b80be57f42cb2f3c25768ede58
parente55a0e971b4bf9e6473bf0ca6bebdff76c075ef6 (diff)
downloadcpython-cdbff3527c5b10e79761ad25316b46cd079304bc.zip
cpython-cdbff3527c5b10e79761ad25316b46cd079304bc.tar.gz
cpython-cdbff3527c5b10e79761ad25316b46cd079304bc.tar.bz2
[doc] Update documentation on logging optimization. (GH-22075)
-rw-r--r--Doc/howto/logging.rst30
1 files changed, 16 insertions, 14 deletions
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index 6316e08..b4dd920 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -1078,20 +1078,22 @@ need more precise control over what logging information is collected. Here's a
list of things you can do to avoid processing during logging which you don't
need:
-+-----------------------------------------------+----------------------------------------+
-| What you don't want to collect | How to avoid collecting it |
-+===============================================+========================================+
-| Information about where calls were made from. | Set ``logging._srcfile`` to ``None``. |
-| | This avoids calling |
-| | :func:`sys._getframe`, which may help |
-| | to speed up your code in environments |
-| | like PyPy (which can't speed up code |
-| | that uses :func:`sys._getframe`). |
-+-----------------------------------------------+----------------------------------------+
-| Threading information. | Set ``logging.logThreads`` to ``0``. |
-+-----------------------------------------------+----------------------------------------+
-| Process information. | Set ``logging.logProcesses`` to ``0``. |
-+-----------------------------------------------+----------------------------------------+
++-----------------------------------------------------+---------------------------------------------------+
+| What you don't want to collect | How to avoid collecting it |
++=====================================================+===================================================+
+| Information about where calls were made from. | Set ``logging._srcfile`` to ``None``. |
+| | This avoids calling :func:`sys._getframe`, which |
+| | may help to speed up your code in environments |
+| | like PyPy (which can't speed up code that uses |
+| | :func:`sys._getframe`). |
++-----------------------------------------------------+---------------------------------------------------+
+| Threading information. | Set ``logging.logThreads`` to ``False``. |
++-----------------------------------------------------+---------------------------------------------------+
+| Current process ID (:func:`os.getpid`) | Set ``logging.logProcesses`` to ``False``. |
++-----------------------------------------------------+---------------------------------------------------+
+| Current process name when using ``multiprocessing`` | Set ``logging.logMultiprocessing`` to ``False``. |
+| to manage multiple processes. | |
++-----------------------------------------------------+---------------------------------------------------+
Also note that the core logging module only includes the basic handlers. If
you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't