summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-11 07:42:07 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-11 07:42:07 (GMT)
commit4a0a31df5c6ab79dd7dc8ee828379dca1d1f632f (patch)
tree0246d7ef13a693a1194cbed38f1df9697f720735 /Doc/library/logging.rst
parent98707c2cede1aa697a1338ea8f7c9a59da42dfe9 (diff)
downloadcpython-4a0a31df5c6ab79dd7dc8ee828379dca1d1f632f.zip
cpython-4a0a31df5c6ab79dd7dc8ee828379dca1d1f632f.tar.gz
cpython-4a0a31df5c6ab79dd7dc8ee828379dca1d1f632f.tar.bz2
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 32f762d..eb2c718 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()