Logger.Sub(tag) derives a child logger with a new tag from the same
writers, with level inherited from the parent but independently
overridable via OLLIE_{TAG}_LOG.
The agent creates an "audit" sub-logger at startup. Key events are
logged at debug level through it:
audit: call: <tool> <args (truncated)>
audit: result: <tool> <content (truncated)>
audit: error: <message>
audit: turn: start/end with cost and session ID
audit: compact: messages removed, trigger, session ID
Enable with OLLIE_AUDIT_LOG=debug.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Sink owns async writers and Flush; created once at startup
- Logger created via Sink.Logger/NewLogger/NewWriter
- agentCore.log field replaces package-level clog
- hooks.Run/runHookCmd accept *Logger parameter
- No globals, no init(). 100% test coverage.