chore(rust): correctly format values in errors

This commit is contained in:
alyssa 2025-05-17 15:05:37 +00:00
parent 347add8998
commit 7737850afb
15 changed files with 54 additions and 62 deletions

View file

@ -124,7 +124,7 @@ pub async fn runner(
.increment(1);
if let Err(error) = shard_state.socket_closed(shard_id).await {
error!("failed to update shard state for socket closure: {error}");
error!(?error, "failed to update shard state for socket closure");
}
continue;
@ -145,7 +145,7 @@ pub async fn runner(
continue;
}
Err(error) => {
error!("shard {shard_id} failed to parse gateway event: {error}");
error!(?error, ?shard_id, "failed to parse gateway event");
continue;
}
};

View file

@ -78,8 +78,8 @@ async fn request_inner(redis: RedisPool, concurrency: u32, shard_id: u32, tx: on
Ok(None) => {
// not allowed yet, waiting
}
Err(e) => {
error!(shard_id, bucket, "error getting shard allowance: {}", e)
Err(error) => {
error!(?error, ?shard_id, ?bucket, "error getting shard allowance")
}
}

View file

@ -129,7 +129,7 @@ async fn real_main() -> anyhow::Result<()> {
}
}
Err(error) => {
error!(error = ?error, "failed to request event target");
error!(?error, "failed to request event target");
}
}
}