aboutsummaryrefslogtreecommitdiff
path: root/src/commands/roll.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-08-16 07:12:33 -0400
committerNathan Perry <np@nathanperry.dev>2024-08-16 07:12:33 -0400
commitc5ce454319a7d54d3967c6ea7695543e943a37b2 (patch)
tree193a6907bc3a476f18774558ca52a3cb7618f912 /src/commands/roll.rs
parent5a2dc4070c1d14f22a7671c6f82ca2f4578369bd (diff)
tracing: use fields rather than interpolation
Diffstat (limited to 'src/commands/roll.rs')
-rw-r--r--src/commands/roll.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/roll.rs b/src/commands/roll.rs
index 16fe15f..5dfdb77 100644
--- a/src/commands/roll.rs
+++ b/src/commands/roll.rs
@@ -9,11 +9,11 @@ pub async fn roll<U: Send + Sync>(
) -> anyhow::Result<()> {
match thulani_calc::Calc::eval(&rest) {
Ok(result) => {
- tracing::debug!("got calc result '{}'", result);
+ tracing::debug!(result, expr = %rest, "got calc result");
util::reply(ctx, result.to_string()).await?;
},
Err(e) => {
- tracing::error!("error encountered reading calc '{}': {}", rest, e);
+ tracing::error!(error = %e, expr = %rest, "error encountered reading calc");
util::reply(ctx, "I COULDN'T READ THAT YOU FUCK").await?;
},
}