diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-08-16 07:12:33 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-08-16 07:12:33 -0400 |
| commit | c5ce454319a7d54d3967c6ea7695543e943a37b2 (patch) | |
| tree | 193a6907bc3a476f18774558ca52a3cb7618f912 /src/commands/meme/history.rs | |
| parent | 5a2dc4070c1d14f22a7671c6f82ca2f4578369bd (diff) | |
tracing: use fields rather than interpolation
Diffstat (limited to 'src/commands/meme/history.rs')
| -rw-r--r-- | src/commands/meme/history.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/meme/history.rs b/src/commands/meme/history.rs index e3d0de3..d6ccdcf 100644 --- a/src/commands/meme/history.rs +++ b/src/commands/meme/history.rs @@ -107,9 +107,10 @@ pub async fn history(ctx: PoiseContext<'_>, n: Option<usize>) -> anyhow::Result< if n > CONFIG.max_hist { tracing::debug!( - "user requested more than MAX_HIST ({}) items from history", - CONFIG.max_hist + MAX_HIST = CONFIG.max_hist, + "user requested more than MAX_HIST items from history", ); + util::reply(ctx, "YER PUSHIN ME OVER THE FUCKIN LINE").await?; } @@ -127,7 +128,7 @@ pub async fn history(ctx: PoiseContext<'_>, n: Option<usize>) -> anyhow::Result< return Ok(()); } - tracing::info!("reporting meme history (len {})", n); + tracing::info!(len = n, "reporting meme history"); let resp = serenity::futures::stream::iter(records.into_iter().enumerate().rev()) .then(|(i, rec)| async move { @@ -181,7 +182,7 @@ pub async fn history(ctx: PoiseContext<'_>, n: Option<usize>) -> anyhow::Result< Err(e) => { if let Some(variant) = e.downcast_ref::<DieselError>() { if *variant != NotFound { - tracing::error!("error encountered loading meme history: {}", e); + tracing::error!(error = %e, "error encountered loading meme history"); } } |
