summaryrefslogtreecommitdiffstats
path: root/Doc/library/logging.rst
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2010-09-27 13:53:47 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2010-09-27 13:53:47 (GMT)
commit76ca3b430c402341e91b04de0d801e754021401b (patch)
treead01f6033ac30cb91f6bb2be60fceaac335b59f2 /Doc/library/logging.rst
parent3b69db27d70f05584b76ece61bb882c26ecfcc68 (diff)
downloadcpython-76ca3b430c402341e91b04de0d801e754021401b.zip
cpython-76ca3b430c402341e91b04de0d801e754021401b.tar.gz
cpython-76ca3b430c402341e91b04de0d801e754021401b.tar.bz2
logging: Updated library configuration documentation.
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r--Doc/library/logging.rst22
1 files changed, 20 insertions, 2 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index feb3e87..838f91a 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -526,10 +526,18 @@ 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".
+**PLEASE NOTE:** It is strongly advised that you *do not add any handlers other
+than* :class:`NullHandler` *to your library's loggers*. This is because the
+configuration of handlers is the prerogative of the application developer who
+uses your library. The application developer knows their target audience and
+what handlers are most appropriate for their application: if you add handlers
+"under the hood", you might well interfere with their ability to carry out
+unit tests and deliver logs which suit their requirements.
+
.. versionadded:: 3.1
- The :class:`NullHandler` class was not present in previous versions, but is
- now included, so that it need not be defined in library code.
+The :class:`NullHandler` class was not present in previous versions, but is
+now included, so that it need not be defined in library code.
@@ -2141,6 +2149,16 @@ for use by library developers.
This method does nothing.
+ .. method:: handle(record)
+
+ This method does nothing.
+
+ .. method:: createLock()
+
+ This method returns `None` for the lock, since there is no
+ underlying I/O to which access needs to be serialized.
+
+
See :ref:`library-config` for more information on how to use
:class:`NullHandler`.