Append a [`TraceRecord`] as a single JSON line to `{root}/.agent-trace/traces.jsonl`. Creates the directory and file if they don't exist. All errors are logged and swallowed — never blocks the caller.
(record: &TraceRecord, root: &Path)
| 225 | /// Creates the directory and file if they don't exist. All errors are |
| 226 | /// logged and swallowed — never blocks the caller. |
| 227 | pub fn append_agent_trace(record: &TraceRecord, root: &Path) { |
| 228 | let result = try_append_agent_trace(record, root); |
| 229 | if let Err(e) = result { |
| 230 | log::warn!("agent-trace: failed to append record: {}", e); |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | // --------------------------------------------------------------------------- |
| 235 | // Internal helpers |