]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45604: add `level` argument to `multiprocessing.log_to_stderr` func (GH-29226...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 28 Oct 2021 20:03:32 +0000 (13:03 -0700)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 20:03:32 +0000 (22:03 +0200)
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>
Doc/library/multiprocessing.rst
Misc/NEWS.d/next/Documentation/2021-10-26-10-00-45.bpo-45604.Dm-YhV.rst [new file with mode: 0644]

index 7588e1ddb80a6dee8f06fe66a5ec1d45dd3305af..2c7d7d8c0e8b12de13a5af9b828c79af31cd8eae 100644 (file)
@@ -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::
 
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 (file)
index 0000000..9da9cca
--- /dev/null
@@ -0,0 +1 @@
+Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.
\ No newline at end of file