PyDocs

Nav

Generic Operating System Services

listen

  • listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None)
Start up a socket server on the specified port, and listen for new
configurations.

These will be sent as a file suitable for processing by dictConfig() or
fileConfig(). 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.
Changed in 3.4
  • 3.4: The verify argument was added.
0 Examples
No examples for logging.config/listen.
See Also
No see-alsos for logging.config/listen
0 Notes
No notes for listen