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/commands/today/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands/today') diff --git a/src/commands/today/mod.rs b/src/commands/today/mod.rs index 7b5fe8d..0b9b857 100644 --- a/src/commands/today/mod.rs +++ b/src/commands/today/mod.rs @@ -1,6 +1,6 @@ use chrono::Duration; +use grate::tracing; use lazy_static::lazy_static; -use log::debug; use rand::{ seq::SliceRandom, thread_rng, @@ -76,11 +76,11 @@ pub async fn today(ctx: PoiseContext<'_>, #[rest] _rest: Option) -> anyh match dt { Ok(dt) => { - debug!("overriding with datetime: {dt}"); + tracing::debug!("overriding with datetime: {dt}"); result = dt; }, Err(e) => { - debug!("parsing datetime: {e:?}"); + tracing::debug!("parsing datetime: {e:?}"); }, }; } @@ -91,7 +91,7 @@ pub async fn today(ctx: PoiseContext<'_>, #[rest] _rest: Option) -> anyh let options: Vec = ALL.iter().flat_map(|f| f(today)).collect(); - debug!("{} options for {}", options.len(), today); + tracing::debug!("{} options for {}", options.len(), today); let play_args = options.choose(&mut thread_rng()); -- cgit v1.3.1