From: Vinay Sajip Date: Sun, 12 Dec 2010 13:49:39 +0000 (+0000) Subject: Logging documentation - further update. X-Git-Tag: v3.2b2~139 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e65cf0b6ab397f3f67c2b516af7b9fba05604bc;p=thirdparty%2FPython%2Fcpython.git Logging documentation - further update. --- diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 8cfb7d51c344..e6e285ed7498 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -146,6 +146,11 @@ messages:: INFO:root:So should this WARNING:root:And this, too +The call to :func:`basicConfig` should come *before* any calls to :func:`debug`, +:func:`info` etc. As it's intended as a one-off simple configuration facility, +only the first call will actually do anything: subsequent calls are effectively +no-ops. + This example also shows how you can set the logging level which acts as the threshold for tracking. In this case, because we set the threshold to ``DEBUG``, all of the messages were printed.