summaryrefslogtreecommitdiff
path: root/Doc/library/logging.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-11 08:42:07 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-11 08:42:07 +0100
commit9c5d6a1b28b5b6eabaede52a31fc42c34599613d (patch)
treec3e41a7e7768c69ec34ccfdab86c3f76e37292b6 /Doc/library/logging.rst
parentbcb99161f731b515acf0ea947bd40b0e2fa3146f (diff)
downloadcpython-9c5d6a1b28b5b6eabaede52a31fc42c34599613d.tar.gz
Added 'handlers' argument to logging.basicConfig.
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r--Doc/library/logging.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 32f762d506..eb2c7189a0 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -983,12 +983,27 @@ functions.
| ``stream`` | Use the specified stream to initialize the |
| | StreamHandler. Note that this argument is |
| | incompatible with 'filename' - if both are |
- | | present, 'stream' is ignored. |
+ | | present, a ``ValueError`` is raised. |
+ +--------------+---------------------------------------------+
+ | ``handlers`` | If specified, this should be an iterable of |
+ | | already created handlers to add to the root |
+ | | logger. Any handlers which don't already |
+ | | have a formatter set will be assigned the |
+ | | default formatter created in this function. |
+ | | Note that this argument is incompatible |
+ | | with 'filename' or 'stream' - if both are |
+ | | present, a ``ValueError`` is raised. |
+--------------+---------------------------------------------+
.. versionchanged:: 3.2
The ``style`` argument was added.
+ .. versionchanged:: 3.3
+ The ``handlers`` argument was added. Additional checks were added to
+ catch situations where incompatible arguments are specified (e.g.
+ ``handlers`` together with ``stream`` or ``filename``, or ``stream``
+ together with ``filename``).
+
.. function:: shutdown()