diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2021-10-28 19:38:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-28 19:38:14 (GMT) |
commit | 1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5 (patch) | |
tree | 71d5d8299efb51febef22d6e6af75d599bf78816 /Doc/library | |
parent | 88d8a1a340fb09c54d47f354f5fd7d4fbc5f0c78 (diff) | |
download | cpython-1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5.zip cpython-1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5.tar.gz cpython-1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5.tar.bz2 |
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>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/multiprocessing.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index f3d725b..7a1a285 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -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:: |