From 5a2dc4070c1d14f22a7671c6f82ca2f4578369bd Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 06:40:25 -0400 Subject: rework logging to use tracing via grate --- src/util/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/util/mod.rs') diff --git a/src/util/mod.rs b/src/util/mod.rs index b9e5f0f..c5bed98 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -1,8 +1,8 @@ use std::process::Stdio; use chrono::Duration; +use grate::tracing; use lazy_static::lazy_static; -use log::debug; use poise::{ CreateReply, FrameworkError, @@ -161,7 +161,7 @@ pub async fn send_result( tts: bool, ) -> anyhow::Result { let text = text.as_ref(); - debug!("sending message {:?} to channel {:?} (tts: {})", text, channel, tts); + tracing::debug!("sending message {:?} to channel {:?} (tts: {})", text, channel, tts); let result = channel.send_message(ctx, CreateMessage::default().content(text).tts(tts)).await?; Ok(result.id) @@ -203,12 +203,12 @@ pub async fn ytdl_url(uri: &str) -> anyhow::Result { uri, ]; - debug!("downloading info for uri: {uri}"); + tracing::debug!("downloading info for uri: {uri}"); let mut command = Command::new(&*crate::config::YTDL_COMMAND); command.args(args).stdin(Stdio::null()); - debug!("running command: {command:?}"); + tracing::debug!("running command: {command:?}"); let out = command.output().await?; -- cgit v1.3.1