Skip to content

Commit 632185b

Browse files
committed
refactor: tracing spwams to use structure formats
When possible prefer this with "variable=value" format: ``` imported_torrents=2 ``` To this: ``` Imported torrents: 2 ``` It's easier to parse and less likely to be changed.
1 parent ced2788 commit 632185b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/torrent-repository/src/swarms.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl Swarms {
231231
inactive_peers_removed += removed;
232232
}
233233

234-
tracing::info!("Inactive peers removed: {inactive_peers_removed}");
234+
tracing::info!(inactive_peers_removed = inactive_peers_removed);
235235

236236
Ok(inactive_peers_removed)
237237
}
@@ -262,7 +262,7 @@ impl Swarms {
262262
peerless_torrents_removed += 1;
263263
}
264264

265-
tracing::info!("Peerless torrents removed: {peerless_torrents_removed}");
265+
tracing::info!(peerless_torrents_removed = peerless_torrents_removed);
266266

267267
Ok(peerless_torrents_removed)
268268
}
@@ -291,7 +291,7 @@ impl Swarms {
291291
torrents_imported += 1;
292292
}
293293

294-
tracing::info!("Imported torrents: {torrents_imported}");
294+
tracing::info!(imported_torrents = torrents_imported);
295295

296296
torrents_imported
297297
}

0 commit comments

Comments
 (0)