db_logger is a Rust crate providing an implementation of the log crate’s logging facade to write structured log entries to a database. Just add a few lines of code to the beginning of your program and all logging will be saved for later analysis, which is especially suited to (distributed) services.

db_logger currently supports PostgreSQL and SQLite and is backed by the sqlx crate.

Related blog posts