toolong icon indicating copy to clipboard operation
toolong copied to clipboard

Feature request: display format when viewing JSON logs

Open antoine-gallix opened this issue 5 months ago • 0 comments

In my opinion, JSON logs are not meant to be read as such by human eye, as one line can carry a lot of information. To really be useful in my workflow, I would need to be able to display a formatted version of each log instead of the raw JSON, while still being able to look at the whole object when highlighted.

The display format would be something like a string with placeholders, being filled by the data in the logs.

For example, let's say all my logs have at least a field called "mesage", which contain a human readable line, and another called "level". I would press a shortcut like "ctrl-D" (display), a one-line window would appear somewhere where I would type "$level $message", press enter, and all my logs would be seen in this format. Highlighting the desired log would allow me to see the whole object.

This feature would make the tool my default for analysing logs, as this is already my workflow, that I use with home-made CLI tools.

antoine-gallix avatar Feb 15 '24 17:02 antoine-gallix