Open IvanRibakov opened 1 month ago
The challenge with doing this is that searches and some other operations need to be done on the rendered text and not on the original file, which would affect performance quite a bit.
Personally I'd be fine with search working on the original file/stream and highlighting being limited (for example highlighting entire entry if the match is found but not present in the UI) as I'm not going to remove/edit/rewrite any crucial information that I'd be searching on. The goal is only to make the logs more human-eye-friendly by stripping some excessive info and improving the indentation/alignment.
Is your feature request related to a problem? Please describe. I'm dealing with non-JSON log files that contain variable-width source file identifiers. I would like to align log entries using
line-format
'smin-width
,max-width
,align
andoverflow
settings.Describe the solution you'd like I'd like to be able to use field names from the
value
object in theline-format
'sfield
field.Describe alternatives you've considered I saw that values have a
rewriter
field but I was unable to understand from the documentation how to achieve what I would like to using that field. Also, I'm not looking forward to re-implementabbrev
logic when it is already available elsewhere.Additional context
Example of the input logs:
Desired output:
Here is the custom format file that I'm working with
``` { "$schema": "https://lnav.org/schemas/format-v1.schema.json", "indigital": { "description": "Format file generated from regex101 entry", "regex": { "std": { "pattern": "^\\s*(?