diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2008-12-03 23:22:58 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2008-12-03 23:22:58 (GMT) |
commit | 213faca204ffcd48c465beac2351c65a15187e8c (patch) | |
tree | 411c48c94ef6d8e0311c18201c28ec8ea556f2f1 /Doc | |
parent | 7989a4dccb39aa954057cbc4205473f09daae84b (diff) | |
download | cpython-213faca204ffcd48c465beac2351c65a15187e8c.zip cpython-213faca204ffcd48c465beac2351c65a15187e8c.tar.gz cpython-213faca204ffcd48c465beac2351c65a15187e8c.tar.bz2 |
Issue #4384: Added logging integration with warnings module using captureWarnings(). This change includes a NullHandler which does nothing; it will be of use to library developers who want to avoid the "No handlers could be found for logger XXX" message which can appear if the library user doesn't configure logging.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/logging.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index dac6aeb1..c5fde33 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -461,6 +461,12 @@ should have the desired effect. If an organisation produces a number of libraries, then the logger name specified can be "orgname.foo" rather than just "foo". +.. versionadded:: 2.7 + +The :class:`NullHandler` class was not present in previous versions, but is now +included, so that it need not be defined in library code. + + Logging Levels -------------- @@ -553,6 +559,15 @@ provided: #. :class:`HTTPHandler` instances send error messages to an HTTP server using either ``GET`` or ``POST`` semantics. +#. :class:`NullHandler` instances do nothing with error messages. They are used + by library developers who want to use logging, but want to avoid the "No + handlers could be found for logger XXX" message which can be displayed if + the library user has not configured logging. + +.. versionadded:: 2.7 + +The :class:`NullHandler` class was not present in previous versions. + The :class:`StreamHandler` and :class:`FileHandler` classes are defined in the core logging package. The other handlers are defined in a sub- module, :mod:`logging.handlers`. (There is also another sub-module, |