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

Method close

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

Tidy up any resources used by the handler. This version removes the handler from an internal map of handlers, _handlers, which is used for handler lookup by name. Subclasses should ensure that this gets called from overridden close() methods.

(self)

Source from the content-addressed store, hash-verified

996 pass
997
998 def close(self):
999 """
1000 Tidy up any resources used by the handler.
1001
1002 This version removes the handler from an internal map of handlers,
1003 _handlers, which is used for handler lookup by name. Subclasses
1004 should ensure that this gets called from overridden close()
1005 methods.
1006 """
1007 #get the module data lock, as we're updating a shared structure.
1008 _acquireLock()
1009 try: #unlikely to raise an exception, but you never know...
1010 self._closed = True
1011 if self._name and self._name in _handlers:
1012 del _handlers[self._name]
1013 finally:
1014 _releaseLock()
1015
1016 def handleError(self, record):
1017 """

Callers 8

formatExceptionMethod · 0.45
closeMethod · 0.45
basicConfigFunction · 0.45
shutdownFunction · 0.45
_read_python_sourceMethod · 0.45
checkMethod · 0.45
diffFunction · 0.45

Calls 2

_acquireLockFunction · 0.85
_releaseLockFunction · 0.85

Tested by 2

checkMethod · 0.36