Live data from Hacker News

Lnav – An advanced log file viewer for the small-scale

lnav.org

1–10 of 60 posts

Re: Lnav – An advanced log file viewer for the small-scale

#4
post #2

Do we need lnav thread every 3 weeks?

First I'd heard of it. I have wanted a tool like this for a while.

Same, and I'm working on an IoT project that precisely needs this (superhigh$ per device, don't need scale or efficiency)

Re: Lnav – An advanced log file viewer for the small-scale

#5
The package is available in Alpine so I tried it out. It seems to work best if the terminal is using en_US.UTF-8. My default is C but I have a function to set UTF-8. I was curious if it could handle stdin and it does. It saves the output in ~/.config/lnav/ something to probably add to my clean up script. It is convenient that it can prepend timestamps to logs. I could see this being nice for people that do QA on build logs all day or that have to debug access logs often. If used with sensitive data one should probably add a shell function and log rotate scripts to clean up ~/.config/lnav/ using the shred command.

Re: Lnav – An advanced log file viewer for the small-scale

#6
post #2

Do we need lnav thread every 3 weeks?

Yes /s

Not everyone checks out daily HN to see all the reposts. Pulling numbers out of the air, I'd say that 5-10% of daily content on HN is a repost, should get used to it. Just hide it an carry on is what I would suggest.

Re: Lnav – An advanced log file viewer for the small-scale

#8
post #2

Do we need lnav thread every 3 weeks?

lnav is pretty great. I wish it had a library that could be pulled out into an app instead of a terminal. There are a few things that make more sense with a GUI like standard keyboard shortcuts, filtering, saving exports, etc.

Re: Lnav – An advanced log file viewer for the small-scale

#10
post #7

Does anyone have a trick for connecting to remote hosts as a non-root user but having it elevate to root to read the logs?

For systemd/journald managed log, best is to add non privileged user to the systemd-journal group.

For logs managed by syslog daemons, most implementations allows you to set the owner and group of the log files. You could decide on a specific log group and add the desired dedicated user to this group.

In the end it is usually better to ship the logs to a dedicated machine/space/database.

Post reply on HN