305 karma · joined August 30, 2013
https://lnav.org/2021/05/03/tailing-remote-files.html
So, to tail "/path/to/log" on host1 and host2, you'd start lnav with:
$ lnav host1:/path/to/log host2:/path/to/log
[1] - This is the initial release of this feature, so it probably has some performance issues. I'd be interested to know if it worked or not.I’ll be using this feature in my day-to-day work because I interact with short-lived VMs running the software I’m developing. Being able to run lnav on my devbox and have it live-tailing logs on the VMs running the changes will be an improvement over the current workflow where I manually copy the files onto the devbox.
Note that there are graphic novels as well as chapter books based on the Netflix version of the stories.
[0] - https://lnav.org
There are at least two tools that support directly querying log files with SQL:
* logparser -- https://en.wikipedia.org/wiki/Logparser
* lnav -- https://lnav.org
lnav uses SQLite and provides quite a few extensions, so quite a lot is possible. The logs are exposed via virtual tables, so there is no separate import step.
You really can't imagine that someone feels differently? Please try to have a more open mind.
I, for one, would much rather spend my free time on my side-project that is actually used by people. I would have a hard time working on something that was a throwaway. (Which is what actually happened when I tried to interview at FB. I spent more time working on the side-project than studying leetcode. FB promptly told me I couldn't code... "OK")
[0] - https://github.com/tstack/lnav/blob/master/test/scripty.cc
It sounds like you are not familiar with this disaster:
https://en.wikipedia.org/wiki/Hyatt_Regency_walkway_collapse
There may be a very good reason things are the way they are.
* lnav about 4 seconds to index[1] and display
* vim about a second to display
* emacs about 3 seconds to display
This is on a late 2013 27-inch iMac with a 3.5Ghz i7 and the file cached.
[1] - Indexing in lnav involves parsing all log lines to extract their timestamp and log level (status codes in this case)
Same here and I'm confused as to why this comment has been downvoted. It's a perfectly good question for level setting. You get an idea of how much the person knows about various aspects of the system without having to ask pointed questions that they may not know. Instead, they get to show you what they are knowledgeable about.
That should make the decision a lot easier.
[1] - https://github.com/tstack/lnav/blob/master/src/ptimec.cc
You complain about having to put initialization into 2 constructors, but there's the flip-side with things like mutexes. In c++, you have to have 2 classes, one for the lock and one for the guard. Whereas with a context-manager, you have one class and the locking code is in the __enter__ and __exit__.
with self.lock:
self.do_stuff()
In that case, I would say that the context-manager is nicer. with alloc_resource() as resource:
resource.use() make |& lnav
The '-t' option will prepend timestamps to the lines that are coming in on stdin so that it will be treated as a log file. The '-w <file>' option will write the stdin data to a file if you want to look at it later: make |& lnav -t -w /tmp/make.out
Is that what you're asking about?Many of the comments I see on here about using '-F' with tail instead of '-f', live searching, and so on are handled in lnav by default. I would really encourage folks to give it a try.