mirror of
https://github.com/OMGeeky/twitch_backup.local_db.git
synced 2026-01-10 13:34:40 +01:00
logging
This commit is contained in:
@@ -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?;
|
||||
|
||||
@@ -29,7 +29,7 @@ async fn run() -> Result<(), Box<dyn Error>> {
|
||||
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...")?;
|
||||
|
||||
Reference in New Issue
Block a user