AGENTS.md@src/logging · git:20260713.a7b0546 · 2026-07-13 · sha256 4f9b423357f16789
AGENTS.md@src/logging git:20260713.a7b0546A
Immutable. This exact content never changes and is served at /api/v1/blob/4f9b423357f16789.
# Logging — Quick Reference
**Full implementation details: `.claude/skills/walnut-logging/SKILL.md`** (levels, redaction
patterns, browser log persistence architecture, investigation commands).
## Essentials
- `import { log } from '../logging/index.js'` → `log.<subsystem>.info('msg', { fields })`;
child loggers via `log.agent.child('loop')`. `initLogging()` once at startup.
- All lines pass `redactSensitiveText()` before hitting disk (API keys, AWS creds, bearer
tokens, PEM blocks, `password=`/`token=` values → `[REDACTED]`).
- Browser `console.log/warn/error` are persisted to the same disk log with
`subsystem: 'browser'` (`console.debug` is NOT — never rely on it). Investigate frontend
issues with `walnut logs -s browser` — the disk log survives page refresh.