← Back to PRs

#15253: Adding structured log content

by emailhxn open 2026-02-13 06:44 View on GitHub →
agents stale size: XL
structured logs are extracted using automated scripts to make them easier for humans to read <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a Python log analyzer plus docs/examples, and instruments embedded runner/tool execution code to emit much richer structured log fields (prompt context, assistant reply/thinking, tool calls/results). It also updates logging settings resolution to support `{DATE}` placeholders and normalize non-absolute log file paths. The main merge-blockers are that the new instrumentation logs full user prompts, tool results, and full assistant message structures at `info` level (persisted to disk by default), which is very likely to capture secrets/PII and tool output contents. Separately, the added analyzer script’s help text references a different filename than the one added, and there’s a stray `logs/log` file that looks accidental. The logger path resolution change also alters how relative log file paths behave and may need reconsideration or explicit documentation. <h3>Confidence Score: 2/5</h3> - Not safe to merge as-is due to high-likelihood sensitive data exposure in default log output. - The new structured logging captures and persists raw prompts, tool outputs, and full assistant message structures at info/debug in multiple places, which is a likely secret/PII leak in normal operation. There are also correctness issues (analyzer help text refers to a different filename; stray committed file) and a behavior change in logger path resolution that can break existing configs. - src/agents/pi-embedded-runner/run/attempt.ts; src/agents/pi-embedded-subscribe.handlers.tools.ts; src/logging/logger.ts; openclaw-log-analyzer.py; logs/log <sub>Last reviewed commit: d381784</sub> <!-- greptile_other_comments_section --> <sub>(5/5) You can turn off certain types of comments like style [here](https://app.greptile.com/review/github)!</sub> <!-- /greptile_comment -->

Most Similar PRs