4 ms·
lnav does support JSON-lines and logfmt logs. For JSON-lines, it will pretty-print the log messages to make them human readable. For logfmt, I seem to remembe
by tstack 4y ago
lnav does support JSON-lines and logfmt logs. For JSON-lines, it will pretty-print the log messages to make them human readable.
For logfmt, I seem to remember the spec not being very clear on quoting semantics (maybe I'm wrong). Anyhow, I would suggest using JSON since it has pretty broad support at this point.
- 10987654321 4y agoHmmm, it doesn't say in https://lnav.org/features#automatic-log-format-detection https://lnav.org/features#automatic-log-format-detection but i see that at least json (and xml) is mentioned under the pretty-printing header. You would know what is supported what with you being the author, just saying that the docs aren't super clear from a quick glance :). And yes, I second the suggestion to focus on JSON. The main benefit of logfmt is that it's simpler for a human to parse directly but in general you probably shouldn't aim for that so..
- tstack 4y ago> Hmmm, it doesn't say in https://lnav.org/features#automatic-log-format-detection https://lnav.org/features#automatic-log-format-detection but i see that at least json (and xml) is mentioned under the pretty-printing header. Yes, I should mention it on the features page. It's currently only mentioned in the main docs: https://docs.lnav.org/en/latest/formats.html https://docs.lnav.org/en/latest/formats.html