Replies: 2 comments 4 replies
-
It sounds like you're interested in displaying log entries from a SQLite table in the normal log view, is that right? That's not supported at the moment, but it's not too dissimilar from the existing support for JSON or CSV logs. I could imagine there being a |
Beta Was this translation helpful? Give feedback.
-
CREATE TABLE history ( When my command hooks fire and pass through my filters I basically write some shell data away into sql. Ideally the log view updates reflect live in lnav. Almost the whole assembly could run in lnav although I do want tables backed to file to preserve long term - but I quite like the idea that the logging is done by passing messages to a memory resident logger rather than load/unload of system though I guess it caches. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been working on recording all shell command via a command prompt function. This allows me to both filter out some common commands I do not even want to log, then store the command start time, end time, user, tty, cwd and command plus any non zero failure code. I can also trim from the log any non-significant commands (think cat, head, tail, less, more etc) quickly and search/access this via a flexible command line tool. All good for me.
In lnav I currently read the full history logs, but this generates 2 display lines per command and has no filtering /trimming. However it IS useful to see the interleaved commands within the full range of other logging I wish to see.
The ideal would be (for me anyway) that lnav can read my command history sqlite file, or have some pass/insert to lnav tables though that might raise issues when I delete trimmable data from my command log. I guess I could open both databases and update from one to the other manually but that is not very fluid as a logging idea.
Obviously my particular file may not be of general value but perhaps there is a more general solution for reading "foreign" sqlite data that could be useful? A sort of table map/translate definition, which I assume is a wheel already invented...
As always, thanks for what we already have and best wishes!!!
Beta Was this translation helpful? Give feedback.
All reactions