Replace dbg macros with tracing events
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
use anyhow::{Context, Result};
|
||||
use chrono::NaiveDateTime;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::instrument;
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Plugin {
|
||||
@@ -16,6 +17,7 @@ pub struct Plugin {
|
||||
pub created_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(pool))]
|
||||
pub async fn insert_plugin(
|
||||
pool: &sqlx::Pool<sqlx::Postgres>,
|
||||
name: &str,
|
||||
@@ -46,4 +48,4 @@ pub async fn insert_plugin(
|
||||
.fetch_one(pool)
|
||||
.await
|
||||
.context("Failed to insert plugin")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user