Add a opt-in mechanism to make the node output logs in JSON format
- Dominant language
- Go
- Stars
- 846
- Forks
- 128
- Avg merge
- 23h 7m
- Merged PRs (30d)
- 88
Description
Add a opt-in mechanism to make the node output logs in JSON format (GOLOG_LOG_FMT=json / cfg.Format) instead of the console encoder.
Points to weigh:
* Machine consumers of the debug command get whole-line JSON, no console-format parsing needed. journalctl / terminal readability suffers; operators would need jq or GOLOG_LOG_FMT=color to read logs comfortably.
* Middle ground worth exploring: per-sink encoders - JSON for the ringbuffer:// sink (what tools consume), console for stderr (what humans read). go-log configures one format globally, so this needs a custom zap core wiring in main.go.
Contributor guide
Research direction
Start in main.go and trace how go-log configures cfg.Format and the ringbuffer:// and stderr sinks used by the node and debug command. Compare the global GOLOG_LOG_FMT=json option with the proposed per-sink behavior, then verify that machine consumers receive whole-line JSON while terminal output remains readable or can use GOLOG_LOG_FMT=color.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100