Skip to main content

format_forensics_for_log

Function
This function is defined in the protocols module.
Render a forensic snapshot dict as a single, stable log line. Pure and side-effect free so it is provable in isolation and safe to call from a signal handler. Unknown/missing fields are simply omitted; the output is a compact key=value sequence prefixed with a stable marker so operators (and log scrapers) can grep gateway-forensics reliably.

Signature

Parameters

Optional
required
The dict returned by :meth:ShutdownForensicsProtocol.snapshot, or None.

Returns

str
A single-line, human-readable summary. Never raises.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4152