summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorPreston Landers <planders@utexas.edu>2017-08-02 20:44:28 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2017-08-02 20:44:28 (GMT)
commit6ea56d2ebcae69257f8dd7af28c357b25bf394c3 (patch)
tree7e4c607a686f94143ef8ceba102df888e35480ea /Doc
parentde34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2 (diff)
downloadcpython-6ea56d2ebcae69257f8dd7af28c357b25bf394c3.zip
cpython-6ea56d2ebcae69257f8dd7af28c357b25bf394c3.tar.gz
cpython-6ea56d2ebcae69257f8dd7af28c357b25bf394c3.tar.bz2
bpo-31080: Allowed logging.config.fileConfig() to accept both args and kwargs. (GH-2979)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/logging.config.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
index a7928a0..0637837 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -715,7 +715,12 @@ a corresponding section in the configuration file.
The ``args`` entry, when :func:`eval`\ uated in the context of the ``logging``
package's namespace, is the list of arguments to the constructor for the handler
class. Refer to the constructors for the relevant handlers, or to the examples
-below, to see how typical entries are constructed.
+below, to see how typical entries are constructed. If not provided, it defaults
+to ``()``.
+
+The optional ``kwargs`` entry, when :func:`eval`\ uated in the context of the
+``logging`` package's namespace, is the keyword argument dict to the constructor
+for the handler class. If not provided, it defaults to ``{}``.
.. code-block:: ini
@@ -754,6 +759,7 @@ below, to see how typical entries are constructed.
level=WARN
formatter=form07
args=('localhost', 'from@abc', ['user1@abc', 'user2@xyz'], 'Logger Subject')
+ kwargs={'timeout': 10.0}
[handler_hand08]
class=handlers.MemoryHandler
@@ -767,6 +773,7 @@ below, to see how typical entries are constructed.
level=NOTSET
formatter=form09
args=('localhost:9022', '/log', 'GET')
+ kwargs={'secure': True}
Sections which specify formatter configuration are typified by the following.