Skip to content

Commit 01d11b1

Browse files
bpo-45604: add level argument to multiprocessing.log_to_stderr func (GH-29226) (GH-29284)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 1fb968c) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 020aa06 commit 01d11b1

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
@@ -2635,12 +2635,13 @@ handler type) for messages from different processes to get mixed up.
26352635
inherited.
26362636

26372637
.. currentmodule:: multiprocessing
2638-
.. function:: log_to_stderr()
2638+
.. function:: log_to_stderr(level=None)
26392639

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

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

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)