MCPcopy Index your code
hub / github.com/python/cpython / isEnabledFor

Method isEnabledFor

Lib/logging/__init__.py:1768–1785  ·  view source on GitHub ↗

Is this logger enabled for level 'level'?

(self, level)

Source from the content-addressed store, hash-verified

1766 return NOTSET
1767
1768 def isEnabledFor(self, level):
1769 """
1770 Is this logger enabled for level 'level'?
1771 """
1772 if self.disabled:
1773 return False
1774
1775 try:
1776 return self._cache[level]
1777 except KeyError:
1778 with _lock:
1779 if self.manager.disable >= level:
1780 is_enabled = self._cache[level] = False
1781 else:
1782 is_enabled = self._cache[level] = (
1783 level >= self.getEffectiveLevel()
1784 )
1785 return is_enabled
1786
1787 def getChild(self, suffix):
1788 """

Callers 12

debugMethod · 0.95
infoMethod · 0.95
warningMethod · 0.95
errorMethod · 0.95
criticalMethod · 0.95
logMethod · 0.95
isEnabledForMethod · 0.45
test_is_enabled_forMethod · 0.45
logMethod · 0.45
test_is_enabled_forMethod · 0.45
test_cachingMethod · 0.45

Calls 1

getEffectiveLevelMethod · 0.95

Tested by 5

test_is_enabled_forMethod · 0.36
logMethod · 0.36
test_is_enabled_forMethod · 0.36
test_cachingMethod · 0.36