tstack/lnav

Enable native Caddy JSON log file format

Kenya-West opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
I want lnav to understand caddy JSON log file format that comes from stdin:

lnav -e 'cat logs/access.log' or cat logs/access.log | lnav

Describe the solution you'd like
I want to navigate through errors, info, warnings like in other understandable logs

Describe alternatives you've considered
I created a custom filter but it is not a good solution

Additional context
Log files (anonymised) examples are here:
caddy_logs_anonymised.txt

Screenshot is this:

2024-05-28_18-17-42

I've pushed a first-pass if you want to download it and try it out:

https://github.com/tstack/lnav/blob/master/src/formats/caddy_log.json

Going to close, reopen if you want more work done.