diff options
Diffstat (limited to 'Doc/library/logging.rst')
-rw-r--r-- | Doc/library/logging.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst index 10772b4..96fd428 100644 --- a/Doc/library/logging.rst +++ b/Doc/library/logging.rst @@ -894,6 +894,16 @@ instantiated directly, but always through the module-level function :const:`NOTSET` is found, and that value is returned. +.. method:: Logger.getChild(suffix) + + Returns a logger which is a descendant to this logger, as determined by the suffix. + Thus, ``logging.getLogger('abc').getChild('def.ghi')`` would return the same + logger as would be returned by ``logging.getLogger('abc.def.ghi')``. This is a + convenience method, useful when the parent logger is named using e.g. ``__name__`` + rather than a literal string. + + .. versionadded:: 2.7 + .. method:: Logger.debug(msg[, *args[, **kwargs]]) Logs a message with level :const:`DEBUG` on this logger. The *msg* is the @@ -2472,6 +2482,11 @@ methods of :class:`Logger`, i.e. :meth:`debug`, :meth:`info`, :meth:`warning`, methods have the same signatures as their counterparts in :class:`Logger`, so you can use the two types of instances interchangeably. +.. versionchanged:: 2.7 + +The :meth:`isEnabledFor` method was added to :class:`LoggerAdapter`. This method +delegates to the underlying logger. + Thread Safety ------------- |