Skip to content

Commit 1fb968c

Browse files
bpo-45604: add level argument to multiprocessing.log_to_stderr func (GH-29226)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
1 parent 88d8a1a commit 1fb968c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Doc/library/multiprocessing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,12 +2636,13 @@ handler type) for messages from different processes to get mixed up.
26362636
inherited.
26372637

26382638
.. currentmodule:: multiprocessing
2639-
.. function:: log_to_stderr()
2639+
.. function:: log_to_stderr(level=None)
26402640

26412641
This function performs a call to :func:`get_logger` but in addition to
26422642
returning the logger created by get_logger, it adds a handler which sends
26432643
output to :data:`sys.stderr` using format
26442644
``'[%(levelname)s/%(processName)s] %(message)s'``.
2645+
You can modify ``levelname`` of the logger by passing a ``level`` argument.
26452646

26462647
Below is an example session with logging turned on::
26472648

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.

0 commit comments

Comments
 (0)