From e2bbf1947c77393281173fa73a5a55d5557d47ea Mon Sep 17 00:00:00 2001 From: lipengyu Date: Mon, 10 Aug 2026 18:14:46 +0800 Subject: [PATCH] logging.config.listen() docstring omits dictConfig() support --- Lib/logging/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Lib/logging/config.py b/Lib/logging/config.py index fab91e663a0f6aa..f566de5750dbf55 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -934,8 +934,9 @@ def 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 fileConfig(). - Returns a Thread object on which you can call start() to start the server, + 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(). @@ -953,8 +954,8 @@ class ConfigStreamHandler(StreamRequestHandler): """ Handler for a logging configuration request. - It expects a completely new logging configuration and uses fileConfig - to install it. + It expects a completely new logging configuration and uses dictConfig + or fileConfig to install it. """ def handle(self): """ @@ -962,7 +963,7 @@ def handle(self): Each request is expected to be a 4-byte length, packed using struct.pack(">L", n), followed by the config file. - Uses fileConfig() to do the grunt work. + Uses dictConfig() or fileConfig() to do the grunt work. """ try: conn = self.connection