Skip to content

Remove the pretty key from JSON loggingΒ #3924

@OisinKyne

Description

@OisinKyne

🎯 Problem to be solved

If you turn log-format to JSON, you get the full normal log line as a key in the JSON, along with the JSON-ified value. This doubles the length of the log for little gain

πŸ› οΈ Proposed solution

Drop the pretty key from JSON logging

Example:

{"level":"warn","ts":"2025-08-22T06:52:31.762796658Z","caller":"peerinfo/peerinfo.go:255","msg":"Mismatching peer builder API status","peer":"selfish-box","peer_builder_api_enabled":true,"builder_api_enabled":false,"topic":"peerinfo","pretty":"WARN peerinfo   Mismatching peer builder API status      {\"peer\": \"selfish-box\", \"peer_builder_api_enabled\": true, \"builder_api_enabled\": false}\n"}

Metadata

Metadata

Assignees

Labels

protocolProtocol Team tickets

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions