summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na92@gmail.com>2018-06-25 04:11:09 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2018-06-25 04:11:09 (GMT)
commitcf67d6a934b51b1f97e72945b596477b271f70b8 (patch)
tree540ae29addd1f37cc2c8020ea8adcdd35a133daf /Doc
parent2af9f5d334eeca588eeee87d177faf0012c63a03 (diff)
downloadcpython-cf67d6a934b51b1f97e72945b596477b271f70b8.zip
cpython-cf67d6a934b51b1f97e72945b596477b271f70b8.tar.gz
cpython-cf67d6a934b51b1f97e72945b596477b271f70b8.tar.bz2
bpo-33897: Add a 'force' keyword argument to logging.basicConfig(). (GH-7873)
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.