Seriously though, I think this is a great idea, and would be interested in how easy it is to write sqlite output adaptors for the various logging libraries out there.
And they won’t be wrong.
sqlite3 logs.db "select log from logs" | grep whatever
https://www.sqlite.org/c3ref/update_hook.html
On a PDP-11, run this program via telnet, rsh, or rexec.
If you're more ambitious, porting SQLite to 2.11BSD would be a fun exercise.
Maybe a user defined function bound to an INSERT trigger. But I believe that functions are also connection specific which is fine for the tail tool, but what happens when the user defined function connection goes away.
I wish Splunk and friends would have an interface like that. Sure it does basic grep, and it is a much more powerful language, but sometimes you just needed some command line magic to find what you wanted.
https://git.sr.ht/~martijnbraam/logbookd
Although I'm not sure it uses WAL2 mode, but that should be a trivial change.
One could flip it around and store logs in a multimedia container, but then you won't have nice indices like with sqlite, just the one big time index
ClikcHouse works really well when you need to store and analyze large logs but compare to SQLite it would require to maintain a server(s). There is DuckDB which is embedded like SQLite and it could be a better than SQLite fit for logs but I have no experience with DuckDB.
I am not sure which one would be better for logs, I would need to play around with it. But i am not sure if SQLite wouldn’t be a better fit.