mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
gh-89258: Add a getChildren() method to logging.Logger. (GH-96444)
Co-authored-by: Éric <merwok@netwok.org>
This commit is contained in:
parent
f7e7bf161a
commit
29f1b0bb1f
4 changed files with 47 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue