summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-10-02 15:15:33 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-10-02 15:15:33 (GMT)
commit3e763daddeb1148018a08044343a3a0ddcfceaa3 (patch)
treeee5ee934c1f89abb03ef4566cb21552078176633 /Lib/logging
parent4ded5512d7ff0d9c86f82af0341ad015c3263272 (diff)
downloadcpython-3e763daddeb1148018a08044343a3a0ddcfceaa3.zip
cpython-3e763daddeb1148018a08044343a3a0ddcfceaa3.tar.gz
cpython-3e763daddeb1148018a08044343a3a0ddcfceaa3.tar.bz2
Updated docstring for logging.config.listen().
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/config.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 7dcef39..e71e89c 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -1,4 +1,4 @@
-# Copyright 2001-2010 by Vinay Sajip. All Rights Reserved.
+# Copyright 2001-2012 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
@@ -19,7 +19,7 @@ Configuration functions for the logging package for Python. The core package
is based on PEP 282 and comments thereto in comp.lang.python, and influenced
by Apache's log4j system.
-Copyright (C) 2001-2010 Vinay Sajip. All Rights Reserved.
+Copyright (C) 2001-2012 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
@@ -782,6 +782,15 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None):
Returns a Thread object on which you can call start() to start the server,
and which you can join() when appropriate. To stop the server, call
stopListening().
+
+ Use the ``verify`` argument to verify any bytes received across the wire
+ from a client. If specified, it should be a callable which receives a
+ single argument - the bytes of configuration data received across the
+ network - and it should return either ``None``, to indicate that the
+ passed in bytes could not be verified and should be discarded, or a
+ byte string which is then passed to the configuration machinery as
+ normal. Note that you can return transformed bytes, e.g. by decrypting
+ the bytes passed in.
"""
if not thread: #pragma: no cover
raise NotImplementedError("listen() needs threading to work")