Repository navigation
Toggle pretty-printed JSON in the logs view #634
Closed
franco-viotti
started this conversation in
Ideas
Replies: 1 comment
|
Agreed: add a Implementation scope and acceptance checks: #645 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Applications often emit one JSON object per log line. In sofka, nested fields are difficult to read in the compact log output. Wrapping helps with width, but it does not show the JSON structure.
Would a toggle between raw logs and indented JSON fit the logs view?
The proposed behavior:
For example, this record:
{"level":"info","message":"request completed","request":{"method":"GET","status":200}}would display as:
{ "level": "info", "message": "request completed", "request": { "method": "GET", "status": 200 } }We tried a local prototype using
Jto toggle the format, and it has been useful in practice. The prototype passedjust checkand was exercised with a development client against a local API fixture streaming JSON and plain text, including narrow-terminal wrapping, filtering, timestamps, and saving. No issue or PR has been opened; this is to check whether the feature is wanted before proposing an upstream change.Would you be interested in this? Happy to adapt the scope, key binding, and copy/save behavior to your preferences.
All reactions