Skip to content

Commit 080f0e2

Browse files
lpyu001miss-islington
authored andcommitted
Update logging.config.listen() docstrings to mention dictConfig() (GH-155479)
logging.config.listen() docstring had omitted dictConfig() support. (cherry picked from commit 791b573) Co-authored-by: stevens <lipengyu@kylinos.cn>
1 parent 4ee3c23 commit 080f0e2

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Lib/logging/config.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,9 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None):
952952
Start up a socket server on the specified port, and listen for new
953953
configurations.
954954
955-
These will be sent as a file suitable for processing by fileConfig().
956-
Returns a Thread object on which you can call start() to start the server,
955+
These will be sent as a file suitable for processing by dictConfig() or
956+
fileConfig(). Returns a Thread object on which you can call start() to
957+
start the server,
957958
and which you can join() when appropriate. To stop the server, call
958959
stopListening().
959960
@@ -971,16 +972,16 @@ class ConfigStreamHandler(StreamRequestHandler):
971972
"""
972973
Handler for a logging configuration request.
973974
974-
It expects a completely new logging configuration and uses fileConfig
975-
to install it.
975+
It expects a completely new logging configuration and uses dictConfig
976+
or fileConfig to install it.
976977
"""
977978
def handle(self):
978979
"""
979980
Handle a request.
980981
981982
Each request is expected to be a 4-byte length, packed using
982983
struct.pack(">L", n), followed by the config file.
983-
Uses fileConfig() to do the grunt work.
984+
Uses dictConfig() or fileConfig() to do the grunt work.
984985
"""
985986
try:
986987
conn = self.connection

0 commit comments

Comments
 (0)