summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 774bd83..90fe92b 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -1131,7 +1131,7 @@ functions.
if no handlers are defined for the root logger.
This function does nothing if the root logger already has handlers
- configured for it.
+ configured, unless the keyword argument *force* is set to ``True``.
.. note:: This function should be called from the main thread
before other threads are started. In versions of Python prior to
@@ -1183,6 +1183,15 @@ functions.
| | with 'filename' or 'stream' - if both are |
| | present, a ``ValueError`` is raised. |
+--------------+---------------------------------------------+
+ | ``force`` | If this keyword argument is specified as |
+ | | true, any existing handlers attached to the |
+ | | root logger are removed and closed, before |
+ | | carrying out the configuration as specified |
+ | | by the other arguments. |
+ +--------------+---------------------------------------------+
+
+ .. versionchanged:: 3.8
+ The ``force`` argument was added.
.. versionchanged:: 3.2
The ``style`` argument was added.