Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add a opt-in mechanism to make the node output logs in JSON format

Open
#332 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
go

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.

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.
Dominant language
Go
Stars
926
Forks
138
Avg merge
11h 34m
Merged PRs (30d)
117

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/sam

All issues in google/sam

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.