Top
Best
New

Posted by wiradikusuma 23 hours ago

Log File Viewer for the Terminal(lnav.org)
293 points | 47 comments
guessmyname 22 hours 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 13 hours 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 20 hours ago||
Wow, the GitHub mobile app doesn't preview PNGs. TIL
ifh-hn 19 hours ago|||
GitHub website does on mobile.
port11 15 hours ago||
GitHub mobile requires login, sadly.
stronglikedan 13 hours ago|||
I'm not seeing them on Chrome on Windows either, but FF works for me.
vdm 15 hours ago||
https://mpryor.github.io/nothing-less/
mixmastamyk 10 hours 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.

tstack 10 hours ago|
> Kinda neat but I had trouble using it. Not sure what it is doing or what it is even showing me.

Can you elaborate a little more? lnav behaves like a pager with the conventional hotkeys for basic stuff. I'm not sure what else you are expecting.

> Also a nitpick but the colors are quite garish

I enjoy colors, so there's a lot going on by default. There are several themes builtin. You can configure the "grayscale" theme by running:

    :config /ui/theme grayscale
elcapitan 19 hours ago||
> ssh playground@demo.lnav.org

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

rgilton 16 hours ago|
Just be aware of the risks! https://security.stackexchange.com/questions/38128/what-are-...
p0w3n3d 22 hours ago||
This is almost the thing I want and need. What I need is some sort of TUI grafana - Json log splitter/organizer/finder
t0duf0du 10 minutes ago||
A good friend of mine made this: https://github.com/DhruvikDonga/log_analyzer
aledevv 18 hours 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.

makapuf 21 hours ago|||
Currently working exactly on that https://gitlab.com/makapuf/treewalker (even if it could always use some love)
dima55 22 hours 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.
dloss 21 hours ago||
If you're fine with CLIs, maybe my Kelora project is worth a look. It's a very flexible log processor with built-in scripting: https://kelora.dev
mitul005 14 hours ago||
Interesting, I want to try this for debugging our AI gateway when you're routing requests across 20+ LLM providers, the logs get noisy fast. Being able to filter by log level, jump between errors, and run SQL-style queries against structured logs in the terminal sounds like a huge time saver. No more grepping through multi-GB log files.
vzaliva 13 hours 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 :)
tstack 12 hours ago||
Oof, sorry you had such a bad experience.

> but there is no obvious way to exit. I tried Q,q

It's not very responsive during initial indexing, which is something I need to improve. Pressing `q` should work to exit in general, though. Pressing CTRL-C three times in quick succession will force quit it.

It would help to know which version you tried. Things have gotten better over the years.

> I tried `man lnav` in separate terminal - but no man page is provided.

A man page exists, but only contains basic information. The builtin help text is much more extensive and can be viewed by running:

    lnav -H
There is also the documentation website: https://docs.lnav.org/

> `ps` shows 3 processes which would not die with SIGTERM, have to `kill -9`.

Older versions of lnav would use readline for the prompt and had to run it in a separate process because of "reasons". More recent versions have a custom prompt and don't require the extra processes.

tjoff 13 hours ago||
I don't know how you got it but q and Q closes it, and there is a man page on my system at least.
rsafaya 17 hours 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.
Sammi 18 hours 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

graemep 18 hours ago|
The problem with GUIs is that AFAIK they need to be installed on the machine the logs you are reading are on so a heavy install on a server.
kevin_thibedeau 14 hours ago||
Qt still runs over X11. You can just have the app and support libs for remote display without a full desktop environment.
kiliancs 13 hours ago|
A discussion from 3 years ago. https://news.ycombinator.com/item?id=34243520
More comments...