aboutsummaryrefslogtreecommitdiff
path: root/src/commands/game.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/game.rs
parent5a2dc4070c1d14f22a7671c6f82ca2f4578369bd (diff)
tracing: use fields rather than interpolation
Diffstat (limited to 'src/commands/game.rs')
-rw-r--r--src/commands/game.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/commands/game.rs b/src/commands/game.rs
index 258feaf..5c51da6 100644
--- a/src/commands/game.rs
+++ b/src/commands/game.rs
@@ -83,9 +83,8 @@ lazy_static! {
.collect::<FnvHashMap<_, _>>();
tracing::info!(
- "loaded user info for {} users ({:#?})",
- result.len(),
- result.keys().collect::<Vec<_>>()
+ users = ?result.keys().collect::<Vec<_>>(),
+ "loaded user info"
);
result
@@ -272,7 +271,7 @@ async fn _game(
let res = DISCORD_MAP.get(&uid).map(|s| s.to_lowercase());
if res.is_none() {
- tracing::info!("user {uid} is not recognized");
+ tracing::info!(%uid, "user is not recognized");
}
res
@@ -454,7 +453,7 @@ pub async fn updategaem(ctx: PoiseContext<'_>, user: Option<String>) -> anyhow::
},
};
- tracing::debug!("parsed userid {:?}", user);
+ tracing::debug!(%user, "parsed userid");
let username = match DISCORD_MAP.get(&user) {
Some(s) => s,
@@ -551,7 +550,7 @@ pub async fn updategaem(ctx: PoiseContext<'_>, user: Option<String>) -> anyhow::
let games_owned =
games_owned.response.games.into_iter().map(|ge| ge.app_id).collect::<FnvHashSet<_>>();
- tracing::debug!("user owns {} steam games", games_owned.len());
+ tracing::debug!(n_games = games_owned.len(), %username, %steam_id, "got owned games");
let found_games = missing_appids
.filter_map(|(ai, x)| {