gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)

Co-authored-by: Éric <merwok@netwok.org>
This commit is contained in:
Vinay Sajip 2022-08-31 10:50:29 +01:00 committed by GitHub
parent f7e7bf161a
commit 29f1b0bb1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 0 deletions

View file

@ -170,6 +170,18 @@ is the module's name in the Python package namespace.
.. versionadded:: 3.2
.. method:: Logger.getChildren()
Returns a set of loggers which are immediate children of this logger. So for
example ``logging.getLogger().getChildren()`` might return a set containing
loggers named ``foo`` and ``bar``, but a logger named ``foo.bar`` wouldn't be
included in the set. Likewise, ``logging.getLogger('foo').getChildren()`` might
return a set including a logger named ``foo.bar``, but it wouldn't include one
named ``foo.bar.baz``.
.. versionadded:: 3.12
.. method:: Logger.debug(msg, *args, **kwargs)
Logs a message with level :const:`DEBUG` on this logger. The *msg* is the