diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-16 06:40:25 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-16 06:40:25 -0400 |
| commit | 5a2dc4070c1d14f22a7671c6f82ca2f4578369bd (patch) | |
| tree | 4dfa57f42a6cca70f1cac5363b7b547e46318c26 /src/commands/roll.rs | |
| parent | 728d951b87ae9ba15ca1453d24ce9ce618badd5a (diff) | |
rework logging to use tracing via grate
Diffstat (limited to 'src/commands/roll.rs')
| -rw-r--r-- | src/commands/roll.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/commands/roll.rs b/src/commands/roll.rs index fd3102c..16fe15f 100644 --- a/src/commands/roll.rs +++ b/src/commands/roll.rs @@ -1,4 +1,5 @@ use crate::util; +use grate::tracing; /// Roll some number of dice or perform a calculation. #[poise::command(prefix_command, guild_only, aliases("calc", "calculate"))] @@ -8,11 +9,11 @@ pub async fn roll<U: Send + Sync>( ) -> anyhow::Result<()> { match thulani_calc::Calc::eval(&rest) { Ok(result) => { - log::debug!("got calc result '{}'", result); + tracing::debug!("got calc result '{}'", result); util::reply(ctx, result.to_string()).await?; }, Err(e) => { - log::error!("error encountered reading calc '{}': {}", rest, e); + tracing::error!("error encountered reading calc '{}': {}", rest, e); util::reply(ctx, "I COULDN'T READ THAT YOU FUCK").await?; }, } |
