lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Support for JsonLines subFields

Open ConorMurphy21 opened this issue 8 months ago • 1 comments

Sometimes Json lines will have identifier fields inside their message body. For example some logs may look like "body": "namespace::functionName(): called with x and y". I realise that probably the best solution would be to change the jsonlines logger to put the function handle as a field in the json, but in a massive codebase that refactor may not be worth doing.

I think for jsonlines allowing specifying "subfields" inside a "field" with the same attributes as "field" but with a regex to match would work well. Or possibly allowing "fields" to specify a "parent" field and "regex".

Thanks for considering the idea :)

ConorMurphy21 avatar Jun 26 '25 23:06 ConorMurphy21

Just bumping this issue to see if it makes sense or if it isn't worth persuing. I'd love to convert my legacy logs to jsonl but I don't want to lose the highlighting from uniquely identifying function handles.

ConorMurphy21 avatar Sep 10 '25 22:09 ConorMurphy21