Skip to content

bpo-45604: add level argument to multiprocessing.log_to_stderr func #29226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.