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

Method isEnabledFor

Lib/logging/__init__.py:1772–1789  ·  view source on GitHub ↗

Is this logger enabled for level 'level'?

(self, level)

Source from the content-addressed store, hash-verified

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

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 2

_is_disabledMethod · 0.95
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