[Python-checkins] bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226)

ambv webhook-mailer at python.org
Thu Oct 28 15:38:19 EDT 2021


https://github.com/python/cpython/commit/1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5
commit: 1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5
branch: main
author: Nikita Sobolev <mail at sobolevn.me>
committer: ambv <lukasz at langa.pl>
date: 2021-10-28T21:38:14+02:00
summary:

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>

files:
A Misc/NEWS.d/next/Documentation/2021-10-26-10-00-45.bpo-45604.Dm-YhV.rst
M Doc/library/multiprocessing.rst

diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index f3d725b822529..7a1a285255ff7 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -2636,12 +2636,13 @@ handler type) for messages from different processes to get mixed up.
    inherited.
 
 .. currentmodule:: multiprocessing
-.. function:: log_to_stderr()
+.. function:: log_to_stderr(level=None)
 
    This function performs a call to :func:`get_logger` but in addition to
    returning the logger created by get_logger, it adds a handler which sends
    output to :data:`sys.stderr` using format
    ``'[%(levelname)s/%(processName)s] %(message)s'``.
+   You can modify ``levelname`` of the logger by passing a ``level`` argument.
 
 Below is an example session with logging turned on::
 
diff --git a/Misc/NEWS.d/next/Documentation/2021-10-26-10-00-45.bpo-45604.Dm-YhV.rst b/Misc/NEWS.d/next/Documentation/2021-10-26-10-00-45.bpo-45604.Dm-YhV.rst
new file mode 100644
index 0000000000000..9da9cca7bf1ea
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2021-10-26-10-00-45.bpo-45604.Dm-YhV.rst
@@ -0,0 +1 @@
+Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.
\ No newline at end of file



More information about the Python-checkins mailing list