MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / emit

Method emit

mitmproxy/addons/eventstore.py:51–56  ·  view source on GitHub ↗
(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

49 self.formatter = log.MitmFormatter(colorize=False)
50
51 def emit(self, record: logging.LogRecord) -> None:
52 entry = LogEntry(
53 msg=self.format(record),
54 level=log.LOGGING_LEVELS_TO_LOGENTRY.get(record.levelno, "error"),
55 )
56 self.event_loop.call_soon_threadsafe(self.callback, entry)

Callers

nothing calls this directly

Calls 3

LogEntryClass · 0.90
formatMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected