From c5ce454319a7d54d3967c6ea7695543e943a37b2 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 07:12:33 -0400 Subject: tracing: use fields rather than interpolation --- src/commands/roll.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/roll.rs') 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( ) -> 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?; }, } -- cgit v1.3.1