feat: structured logging to file via slog#134
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98c9f9cae1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| func PayloadValue(payload string) slog.Value { | ||
| payload = redactString(payload) |
There was a problem hiding this comment.
Avoid hashing payloads when logging is disabled
When NEO_LOG is unset (the default), every logx.Debug call still evaluates its arguments before the discard logger sees them, so PayloadValue redacts and SHA-256 hashes full request/response/tool bodies even though nothing will be written. This is especially costly for uncapped tool output because runTool logs out before the caller applies capToolResultContent, so a large bash output now gets an extra full scan/hash in normal runs; short-circuit this helper or its call sites when logging is disabled.
Useful? React with 👍 / 👎.
# Conflicts: # cmd/neo/main.go # internal/tui/model.go
Summary
Closes #18