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

Function addLevelName

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

Associate 'levelName' with 'level'. This is used when converting levels to text during message formatting.

(level, levelName)

Source from the content-addressed store, hash-verified

148 return "Level %s" % level
149
150def addLevelName(level, levelName):
151 """
152 Associate 'levelName' with 'level'.
153
154 This is used when converting levels to text during message formatting.
155 """
156 _acquireLock()
157 try: #unlikely to cause an exception, but you never know...
158 _levelToName[level] = levelName
159 _nameToLevel[levelName] = level
160 finally:
161 _releaseLock()
162
163if hasattr(sys, "_getframe"):
164 currentframe = lambda: sys._getframe(1)

Callers

nothing calls this directly

Calls 2

_acquireLockFunction · 0.85
_releaseLockFunction · 0.85

Tested by

no test coverage detected