MCPcopy Index your code
hub / github.com/microsoft/Webwright / append_runtime_log

Function append_runtime_log

src/webwright/utils/logging.py:9–21  ·  view source on GitHub ↗
(path: Path | None, *, source: str, event: str, **data: Any)

Source from the content-addressed store, hash-verified

7
8
9def append_runtime_log(path: Path | None, *, source: str, event: str, **data: Any) -> None:
10 if path is None:
11 return
12 path.parent.mkdir(parents=True, exist_ok=True)
13 payload = {
14 "timestamp": datetime.now(timezone.utc).isoformat(),
15 "source": source,
16 "event": event,
17 **data,
18 }
19 with path.open("a", encoding="utf-8") as handle:
20 handle.write(json.dumps(payload, ensure_ascii=True))
21 handle.write("\n")

Callers 3

_log_gateway_errorMethod · 0.90
_query_asyncMethod · 0.90
_complete_text_asyncMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected