MCPcopy Index your code
hub / github.com/RustPython/RustPython / getChild

Method getChild

Lib/logging/__init__.py:1791–1808  ·  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 named using

(self, suffix)

Source from the content-addressed store, hash-verified

1789 return is_enabled
1790
1791 def getChild(self, suffix):
1792 """
1793 Get a logger which is a descendant to this one.
1794
1795 This is a convenience method, such that
1796
1797 logging.getLogger('abc').getChild('def.ghi')
1798
1799 is the same as
1800
1801 logging.getLogger('abc.def.ghi')
1802
1803 It's useful, for example, when the parent logger is named using
1804 __name__ rather than a literal string.
1805 """
1806 if self.root is not self:
1807 suffix = '.'.join((self.name, suffix))
1808 return self.manager.getLogger(suffix)
1809
1810 def getChildren(self):
1811

Callers 1

test_child_loggersMethod · 0.80

Calls 2

getLoggerMethod · 0.80
joinMethod · 0.45

Tested by 1

test_child_loggersMethod · 0.64