GrepConsole icon indicating copy to clipboard operation
GrepConsole copied to clipboard

Format JSON in output logs

Open atomaszg opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe. Some logs contains JSON payload which requires visual analysis to verify that fields have proper values. Usually I copy the specific log, paste to other plugin JSONFormatter and verify.

Describe the solution you'd like It would be great if json in log will be recognised by plugin and formatted. Such thing can be optionally enabled.

Describe alternatives you've considered Write some log decoration logic which will be triggered only in integration tests.

atomaszg avatar Oct 02 '25 08:10 atomaszg

does the line with json have some prefix?

https://github.com/krasa/GrepConsole/issues/301

krasa avatar Oct 02 '25 08:10 krasa

No, there are various logs having json in the middle usually:

  • json data fetched from external http clients
  • response returned by some spring controllers
  • json documents fetched from db for example mongo

atomaszg avatar Oct 02 '25 09:10 atomaszg