lens icon indicating copy to clipboard operation
lens copied to clipboard

Logging section json prettify and custom keyword coloring

Open RobinBaeckman opened this issue 3 years ago • 5 comments

What would you like to be added: Formatting/prettifying json in logging section and add so keywords can be color coded.

Why is this needed: Its difficult to read the logs when they are on one line, it would be nice to have the option to "prettify" json log lines. To improve readability further have a section where user can input keywords correlated to a color so logs can be both prettified and have keyword coloring

  • Kubernetes distribution: GKE
  • Desktop OS: macOS

RobinBaeckman avatar Jun 12 '21 13:06 RobinBaeckman

I agree that reading structured json logs is not so great. Maybe a more flexible approach would be for Lens to support configuring a 'log filter' that could point to any cmd line tool. For example, we use a tool called pino-pretty to format our JSON logs for humans. This approach would allow people to customize the log formatting.

mjpowersjr avatar Aug 03 '21 12:08 mjpowersjr

that would be great @mjpowersjr

RobinBaeckman avatar Aug 05 '21 10:08 RobinBaeckman

Waiting for this

backtozero avatar Dec 24 '21 08:12 backtozero

What about wrapping something like this (https://github.com/gistia/json-log-viewer) as Lens Extensions to provide an alternative log viewer?

foal avatar Jan 12 '22 06:01 foal

this would be great

maxiangelo avatar Sep 27 '23 13:09 maxiangelo