Last year, I wrote a piece of code as part of another project to save any logs emitted via the log facade into a PostgreSQL database. And last week, I took that chunk of code, split it out into its own crate, cleaned it up a little, and just published its 0.1.0 release.
The db_logger crate currently supports PostgreSQL and SQLite as backends. Beware there are many limitations and that this crate may be a "dead end" (I would have done things quite differently based on what I know now), but I'm guessing that this might be useful in its current form to someone out there
For more details, see this blog post: Introducing db_logger - Julio Merino (jmmv.dev)
Thanks for reading!