diff --git a/acrate_database/src/meta.rs b/acrate_database/src/meta.rs index ee23e19..17e141a 100644 --- a/acrate_database/src/meta.rs +++ b/acrate_database/src/meta.rs @@ -355,10 +355,13 @@ impl FromSql for Mime String: FromSql, { fn from_sql(bytes: ::RawValue<'_>) -> diesel::deserialize::Result { + log::trace!("Reading TEXT from the database..."); let s = >::from_sql(bytes)?; + log::trace!("Attempting to parse as a media type: {s:?}"); let mime = mime::Mime::from_str(&s)?; + log::trace!("Successfully parsed media type: {mime:?}"); Ok(Self(mime)) } } @@ -370,8 +373,10 @@ impl ToSql for Mime str: ToSql, { fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, DB>) -> diesel::serialize::Result { + log::trace!("Getting the essence of a media type to prepare for serialization..."); let mime = self.0.essence_str(); + log::trace!("Serializing media type as TEXT: {mime:?}"); >::to_sql(mime, out) } }