MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / getChild

Method getChild

tools/python-3.11.9-amd64/Lib/logging/__init__.py:1756–1773  ·  view source on GitHub ↗

Get a logger which is a descendant to this one. This is a convenience method, such that logging.getLogger('abc').getChild('def.ghi') is the same as logging.getLogger('abc.def.ghi') It's useful, for example, when the parent logger is na

(self, suffix)

Source from the content-addressed store, hash-verified

1754 return is_enabled
1755
1756 def getChild(self, suffix):
1757 """
1758 Get a logger which is a descendant to this one.
1759
1760 This is a convenience method, such that
1761
1762 logging.getLogger('abc').getChild('def.ghi')
1763
1764 is the same as
1765
1766 logging.getLogger('abc.def.ghi')
1767
1768 It's useful, for example, when the parent logger is named using
1769 __name__ rather than a literal string.
1770 """
1771 if self.root is not self:
1772 suffix = '.'.join((self.name, suffix))
1773 return self.manager.getLogger(suffix)
1774
1775 def __repr__(self):
1776 level = getLevelName(self.getEffectiveLevel())

Callers

nothing calls this directly

Calls 2

getLoggerMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected