Log File Viewer for the Terminal (lnav.org)

by wiradikusuma 56 comments 335 points
Read article View on HN

56 comments

[−] guessmyname 53d ago
Oh yeah! lnav is famous. I remember using it like a decade ago to monitor an array of web servers while at GoDaddy; good ol' times.

First commit is from Sep 13, 2009: https://github.com/tstack/lnav/commit/b4ec432515e95e86ec9d71... . Woah! we’re old.

This is what the UX looked like back in the day: https://github.com/tstack/lnav/commit/bce2caa654160518ec11f6...

[−] packetlost 53d ago
Aside from the bitmap font, this looks pretty much the same as it does now lol

I'll also add I used lnav more recently for viewing logs from many small lab devices centralized via syslog, it was extremely lightweight and effective.

[−] boomskats 53d ago
Wow, the GitHub mobile app doesn't preview PNGs. TIL
[−] ifh-hn 53d ago
GitHub website does on mobile.
[−] port11 53d ago
GitHub mobile requires login, sadly.
[−] stronglikedan 53d ago
I'm not seeing them on Chrome on Windows either, but FF works for me.
[−] elcapitan 53d ago

> ssh playground@demo.lnav.org

Really appreciate this way to demo it quickly, very nice!

[−] rgilton 53d ago
[−] rsafaya 53d ago
I wish I had found this earlier. Nothing like looking at thousands of EV charger logs all day to mak you appreciate something like this.
[−] p0w3n3d 53d ago
This is almost the thing I want and need. What I need is some sort of TUI grafana - Json log splitter/organizer/finder
[−] aledevv 53d ago
In my opinion logfile navigator is much better than grafana, I use grafana to view a lot of microservices docker logs, but it's too tedious for me (even if depends on your specific use case).

This one, on the other hand, is cleaner and lets you find what you're looking for quickly. And, last but not least, is much lighter.

[−] p0w3n3d 47d ago
I'm thinking of logs that are configured to ship as Json but sometimes you have no grafana or have local logs (tests run locally in container) and would like to search through them efficiently
[−] makapuf 53d ago
Currently working exactly on that https://gitlab.com/makapuf/treewalker (even if it could always use some love)
[−] dima55 53d ago
I use vnlog and feedgnuplot to massage and plot data on the console all the time. It's even less than a tui, but might be what you want.
[−] t0duf0du 52d ago
A good friend of mine made this: https://github.com/DhruvikDonga/log_analyzer
[−] Sammi 53d ago
This looks great.

I've been using klogg and if you're more into GUI's then I think it's the best there is. It opens and searches in log files of many gigabytes with easy. It's a simple and clean multiplatform QT app.

https://github.com/variar/klogg

[−] vzaliva 53d ago
So, I started it and was doing something but there is no obvious way to exit. I tried Q,q, Ecc, :q. I tried man lnav in separate terminal - but no man page is provided. ps shows 3 processes which would not die with SIGTERM, have to kill -9. But nice web site :)
[−] mixmastamyk 53d ago
Kinda neat but I had trouble using it. Not sure what it is doing or what it is even showing me. I'd recommend a more CUA-esque interface like turbo vision, the msedit of old, or micro if it had a menu.

If I have to read the manual, if it isn't blindingly obvious how to use, I'd rather just use journal or tail -f.

Also a nitpick but the colors are quite garish, perhaps 256 colors and muted or monochrome effects if possible. For some reason the colors on the site screenshot are less saturated than the one packaged in my distro, fedora, 0.12.4.

[−] asmosoinio 53d ago
Looks very useful, will give it a go.

This resonates with my use of grep+less: https://github.com/tstack/lnav?tab=readme-ov-file#why-not-ju...

[−] brunosutic 53d ago
I tried lnav about 7-8 years ago and as a terminal junkie I really liked the features.

The only breaking thing was a huge (almost bloated) memory consumption. At that time lnav basically just kept everything in memory. Does anyone did that change?

[−] __bax 53d ago
Must have tool!
[−] kiliancs 53d ago
A discussion from 3 years ago. https://news.ycombinator.com/item?id=34243520
[−] NoSalt 53d ago
Just out of curiosity, is there a log file viewer that ISN'T for the terminal?
[−] steveharing1 53d ago
I was looking for something like this, Appreciate it!
[−] SoftTalker 53d ago
I've always just used less(1).
[−] worksonmine 53d ago
It's a nice tool but I really wish the configuration wasn't done in json and loaded from $XDG_CONFIG_HOME.
[−] frrlpp 51d ago
More or less, logs are text.
[−] secureblueprint 53d ago
This is very helpful
[−] yagelar 53d ago
very nice, definitely will use it
[−] niobe 51d ago
journalctl anyone?
[−] peytongreen_dev 53d ago
[flagged]
[−] mitul005 53d ago
[flagged]
[−] leontloveless 53d ago
[dead]
[−] vincentabolarin 53d ago
This looks genuinely useful.
[−] Duke64 53d ago
I'm a little disappointed that it's not written in Rust.
[−] teh 53d ago
Super useful tool but need to be aware that this is reading potentially untrusted input (e.g. in the case of http request logs) and written in c++, so a possible attack vector. I use lnav where I trust the logs, but do wish a safe implementation existed.