Skip to content

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

Description

@kaisoz

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions