You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: emit all logs as JSON events in --json mode (v0.5.4)
Complete JSON-only output mode - ALL logs (messages, events, diagnostics)
now emitted as JSON to stdout when using --json flag.
Key Features:
- Pure JSONL stream - every line is a valid JSON object
- Two event types: conversation events + log.entry events
- Diagnostic logs (zerolog INF/WRN/ERR/DBG) emitted as log.entry with role="diagnostic"
- Chat messages emitted as log.entry with role="agent"/"system"/"user"
- Includes all metadata: tokens, cost, duration, agent info
- Perfect for log aggregators, monitoring, CI/CD, automation
Technical Implementation:
- New event type: log.entry in internal/bridge/events.go
- New module: internal/bridge/zerolog_json_writer.go (custom zerolog writer)
- Updated: internal/bridge/stdout_emitter.go (EmitLogEntry method)
- Updated: pkg/logger/logger.go (JSON emitter integration)
- Updated: cmd/run.go (logger reinitialization for JSON mode)
All quality checks passing:
✅ go test -v -race ./... (all tests pass)
✅ go build -o agentpipe .
✅ Manual testing with --json flag
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments