The Logfile Navigator (https://lnav.org) is a log file viewer/merger/tailer for the terminal. It has some advanced UX features, like showing previews of operations and displaying context sensitive help. For example, the preview for filtering out logs by regex is to highlight the lines that will be hidden in red. This can make crafting the right regex a bit easier since the preview updates as you type. lnav also has some simple bar charting abilities, so you can visualize the results of SQL queries made against the log messages.
Hah, I just started reading The Story of Diva and Flea[1] to my 5-year-old and "Flea" describes himself as a Flâneur. Still trying to figure out the right way to pronounce it...
that and more magic of sed, awk, jq and similar. I know you can do real magic in there but still, I believe it's easier to learn GUI than vim shortcuts or sophisticated jq/awk formulas. Still, I admire terminal for being around for so long and follow it as an example when building Logdy.
I also wish for a rust replacement of lnav! (I'm the author)
I actually started working on one earlier this year and made some progress before getting distracted. I was using tui-rs, which then got forked to ratatui. I should check back in with it sometime soon.
As it happens, I'm one of the maintainers of Ratatui, so it's been a little bit more than an idle thought... If you do happen to find time to revive the project I'd be happy to help. Come say hi on the ratatui discord / matrix.
Did you run into any huge roadblocks when you were trying to port the C++ codebase? I've really been digging `lnav` for the last few days - it gives me a sizeable fraction of Datadog's power in my tiny new embedded world.
Yes, there were some roadblocks and that made me lose some steam. What's kinda funny is that I spent a lot of time trying to make pretty errors[1] in lnav as inspired by rustc, but had a hard time replicating that in the rust ecosystem. For example, I was using serde to parse lnav's JSON configuration files, but getting serde to report
line numbers (and/or a JSON path) for errors was pretty difficult. I think serde was also missing a way to report multiple errors.
Otherwise, I had wanted to do some rearchitecting to do log parsing in background threads since it's largely sync in the C++ version. Doing that in rust was great since the borrow-checker guided me down a sane path.
Yep, exactly this. I wrote a short blog post[1] announcing the playground, but didn't go into much detail. All this stuff just runs on the free-tier of fly.io since it doesn't get much traffic.
Ah! I was about to write you an email to ask some further questions, but then I saw you replied here on HN. This is excellent, thanks for doing such a good job with your ChangeBlog.
> all so that the same binary runs on multiple operating systems, which isn’t actually very useful.
I like to mention my use case when this comes up: my log file viewer (https://lnav.org) uploads an agent to remote hosts in order to tail log files on that host[1]. While lnav itself is not built using cosmo, the agent is. So, it works on multiple OSs without having to compile and include multiple versions of the agent.
Man oh man, how come I didn't find this tool 6 months ago? I think you need more topics/tags on the github repo :-D
Extremely cool, I will definitely check out lnav when I get a chance. I've been battling with the big players for a few months now and their systems are just so overengineered and complex for my needs that it's silly.
I just need tail -f for 10-ish servers and desktops.
I haven't even read the project readme, but I presume lnav is exactly what I wanted. Excellent!
I just wrote a similar thing. A simple CLI that posts alerts and heartbeats to Alerta. I used Go mainly for the same reason. (But I also couldn't write it in C or C++ :D)