fix(logging): redact persisted transcript text

(cherry picked from commit 406ae72fd2)
This commit is contained in:
Vincent Koc
2026-04-26 11:38:38 -07:00
committed by Peter Steinberger
parent c8972376cb
commit 55d1a2e0e0
14 changed files with 178 additions and 31 deletions

View File

@@ -167,14 +167,16 @@ file log levels.
### Redaction
Tool summaries can redact sensitive tokens before they hit the console:
OpenClaw can redact sensitive tokens before they hit console output, file logs,
OTLP log records, or persisted session transcript text:
- `logging.redactSensitive`: `off` | `tools` (default: `tools`)
- `logging.redactPatterns`: list of regex strings to override the default set
Redaction applies at the logging sinks for **console output**, **stderr-routed
console diagnostics**, and **file logs**. File logs stay JSONL, but matching
secret values are masked before the line is written to disk.
File logs and session transcripts stay JSONL, but matching secret values are
masked before the line or message is written to disk. Redaction is best-effort:
it applies to text-bearing message content and log strings, not every
identifier or binary payload field.
## Diagnostics and OpenTelemetry