summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-28 19:58:24 (GMT)
committerGitHub <noreply@github.com>2021-10-28 19:58:24 (GMT)
commitfb80aede6ab5d10297b787526657b1a6e20a706a (patch)
tree04c63c938365654e9b608f125108c7d6cccdf25b /Doc
parent1d88b2b0a15198843a43f34aba1abc65455d3ba7 (diff)
downloadcpython-fb80aede6ab5d10297b787526657b1a6e20a706a.zip
cpython-fb80aede6ab5d10297b787526657b1a6e20a706a.tar.gz
cpython-fb80aede6ab5d10297b787526657b1a6e20a706a.tar.bz2
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226) (GH-29283)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/multiprocessing.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 7225b65..4562128 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -2635,12 +2635,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::