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 1fb968c07a)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2021-10-28 13:03:32 -07:00 committed by GitHub
parent 020aa06ec8
commit 01d11b1d62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View 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::

View file

@ -0,0 +1 @@
Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.