Live data from Hacker News

Log File Viewer for the Terminal

lnav.org

51–60 of 60 posts

Re: Log File Viewer for the Terminal

#51
post #43
post #23

I'm a little disappointed that it's not written in Rust.

How would this improve the functionality of lnav?

Just so we're clear, this was more or less a joke! As far as I'm concerned, lnav is just fine as it is. There's no urgent need to rewrite it.

Why I wrote the comment: I saw the headline, checked out the website, and thought to myself, “Hey, cool—a new handy tool.” As is typical for “cool new and handy tools,” these are usually written in Rust these days ;) That’s why I was “disappointed” (not really).

I didn’t realize until later that lnav was created in 2007.

Again: the tool is great, thanks and kudos to tstack for the work.

Re: Log File Viewer for the Terminal

#52
post #33
post #23

I'm a little disappointed that it's not written in Rust.

Speaking as the author, I too wish it was written in Rust. But, I started it in 2007 when I needed to get practice with C++ for work. At this point, there's so much code in lnav, rewriting would be a long process. There are some sub-components[1] that are written in Rust though. A new project called logana[2] is written in Rust and is headed in a good direction. Use/contribute to that if you're really interested. [1]…

Thanks for the reply and the tip about logana.

As I mentioned in the following comment[1], that was meant more as a joke. Thanks for your work!

[1] - https://news.ycombinator.com/item?id=47514276

Re: Log File Viewer for the Terminal

#53
post #42
post #39

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 :)

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 separ…

I've installed from snap store

Re: Log File Viewer for the Terminal

#54
post #49

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 pos…

> 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" the…

Thanks, I didn’t know what logs it opened, or how to open others. It had menus and drop downs but I didn’t understand what they were listing.

Need to read the manual I guess, not a big deal but it should be obvious for a log viewer. Why I recommended CUA, though I understand it is not so common on Unix.

Re: Log File Viewer for the Terminal

#55
post #53
post #42

Earlier quoted context omitted.

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 separ…

I've installed from snap store

re: man page - It looks like there is no support for man pages from the snap infrastructure. So, there's not much I can do.

The "stable" version of the snap is really old (circa 2023) at this point because I have been shy about bumping it. The candidate and edge versions are more recent and should be more usable.

Thanks for your time.

Re: Log File Viewer for the Terminal

#58
post #22

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.

Memory safety doesn't mean it's safe. And C++ doesn't mean it's unsafe. Browsers are in C++, do you not use them? Curl is in C, do you not use it? Kernel is C...

"Memory safe" means that there are no memory safety issues. One of the most critical areas targeted by exploits is just gone. And this in turn leads -- according to the numbers published by Google -- to a severe reduction of exploitable issues.

C++ means you can not know whether code is safe or not. That does not mean it is unsafe, but assuming it is is the only sane way to handle this. Incidentally this is exactly what browsers do: They typically require two out of these three to be true for any new piece of code: "written in a memory-safe languge", "sandboxed" and "no untrusted inputs". This blocks C++ from some areas in a browser completely.

Re: Log File Viewer for the Terminal

#60
post #17
post #2

This is almost the thing I want and need. What I need is some sort of TUI grafana - Json log splitter/organizer/finder

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.

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
Post reply on HN