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

Method _clear_cache

Lib/logging/__init__.py:1450–1460  ·  view source on GitHub ↗

Clear the cache for all loggers in loggerDict Called when level changes are made

(self)

Source from the content-addressed store, hash-verified

1448 c.parent = alogger
1449
1450 def _clear_cache(self):
1451 """
1452 Clear the cache for all loggers in loggerDict
1453 Called when level changes are made
1454 """
1455
1456 with _lock:
1457 for logger in self.loggerDict.values():
1458 if isinstance(logger, Logger):
1459 logger._cache.clear()
1460 self.root._cache.clear()
1461
1462#---------------------------------------------------------------------------
1463# Logger classes and functions

Callers 3

setLevelMethod · 0.80
disableFunction · 0.80

Calls 2

valuesMethod · 0.45
clearMethod · 0.45

Tested by 1