MCPcopy Create free account
hub / github.com/Tencent/digitalhuman / emit

Method emit

HATE/basic_hate/agentverse/logging.py:21–24  ·  view source on GitHub ↗
(self, record)

Source from the content-addressed store, hash-verified

19 super().__init__(filename, mode, encoding, delay)
20
21 def emit(self, record):
22 json_data = json.loads(self.format(record))
23 with open(self.baseFilename, "w", encoding="utf-8") as f:
24 json.dump(json_data, f, ensure_ascii=False, indent=4)
25
26
27class JsonFormatter(logging.Formatter):

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45
dumpMethod · 0.45

Tested by

no test coverage detected