From cc9c467668499ebdba45bbe640afd8109cc0a577 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sat, 20 Apr 2024 12:49:16 +0200 Subject: [PATCH] logging --- src/lib.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3ef6e22..ae2b902 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,7 @@ pub async fn migrate_db(db: &DatabaseConnection) -> Result<(), DbErr> { } /// Prints all entries in the database. This is for debugging. -#[instrument] +#[instrument(skip(db))] pub async fn print_db(db: &DatabaseConnection) -> Result<(), DbErr> { info!("Printing DB"); let users = Users::find().all(db).await?; diff --git a/src/main.rs b/src/main.rs index 35ce60b..c48573a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,7 @@ async fn run() -> Result<(), Box> { info!("Bye!"); Ok(()) } -#[instrument] +#[instrument(skip(db))] async fn sample(db: &DatabaseConnection) -> anyhow::Result<()> { let users = twba_local_db::get_watched_users(db).await?; let user = users.first().context("Could not get any users...")?;