Looking for solutions out there, or recommendations for macOS. Specifically, static log files (structured JSON) that is easy to filter and has color coding (log levels).<p>What I am finding is that there are mainly "tail" type log viewers via the terminal, or cloud based. I'm looking for something local I can install.
I guess many people use Graylog, Splunk or similar web-based systems (which can be self-hosted if you like) and are content with that. Not sure if there are any readymade applications for using locally on your Mac.<p>Maybe you can hack something together with jq + Bash + awk etc?<p>These tools might also be useful:<p><a href="https://kantord.github.io/emuto/" rel="nofollow">https://kantord.github.io/emuto/</a><p><a href="https://github.com/antonmedv/fx" rel="nofollow">https://github.com/antonmedv/fx</a><p>Best of luck!
The Logfile Navigator (<a href="https://lnav.org" rel="nofollow">https://lnav.org</a>) is a TUI for viewing log files that can be configured to process structured JSON files. It has quite a few features, like filtering and color coding.<p>The documentation for writing a format file is here -- <a href="https://docs.lnav.org/en/latest/formats.html" rel="nofollow">https://docs.lnav.org/en/latest/formats.html</a><p>The format file tells lnav what common fields are in the log messages and how to format them into plaintext for display. Here's an example configuration for JSON logs -- <a href="https://github.com/tstack/fullsail_lnav_config/blob/master/fullsail_log.json" rel="nofollow">https://github.com/tstack/fullsail_lnav_config/blob/master/f...</a>
Lame but powerful option: `tail -f /logfile.log | grep -A10 -B10 <interesting thing>`. (prints 10 lines before & after search lines). The most powerful feature I've had in log management is the ability to search for what was interesting, and no tool can provide you a "this is interesting" button. If you've got performance concerns ripgrep is a drop-in grep replacement that's very fast.
Graylog. It’s surprisingly quick and easy to get going. Here’s a good starter video.<p><a href="https://www.youtube.com/watch?v=rtfj6W5X0YA" rel="nofollow">https://www.youtube.com/watch?v=rtfj6W5X0YA</a>