mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
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>
This commit is contained in:
parent
88d8a1a340
commit
1fb968c07a
|
@ -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::
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs.
|
Loading…
Reference in a new issue