explain debug messages

This commit is contained in:
yggverse 2025-08-13 16:38:49 +03:00
parent 23c7feb85a
commit 7568a9e77d

View file

@ -74,7 +74,7 @@ async fn main() -> Result<()> {
let is_expired = t > time_queue - Duration::from_secs(config.ban); let is_expired = t > time_queue - Duration::from_secs(config.ban);
if is_expired { if is_expired {
log::debug!( log::debug!(
"remove `{}` from the ban list by timeout expire ({t})", "remove ban for `{}` by the timeout expiration ({t})",
i.as_string() i.as_string()
) )
} }
@ -221,13 +221,17 @@ async fn main() -> Result<()> {
} }
Ok(_) => panic!(), Ok(_) => panic!(),
Err(e) => { Err(e) => {
log::debug!("failed to resolve torrent `{h}`: `{e}`."); log::debug!(
"failed to resolve torrent `{h}`: `{e}`, ban for {} seconds.",
config.ban
);
assert!(ban.insert(i, Local::now()).is_none()); assert!(ban.insert(i, Local::now()).is_none());
} }
}, },
Err(e) => { Err(e) => {
log::debug!( log::debug!(
"skip awaiting the completion of adding torrent `{h}` data (`{e}`)" "skip awaiting the completion of adding torrent `{h}` data (`{e}`), ban for {} seconds.",
config.ban
); );
assert!(ban.insert(i, Local::now()).is_none()); assert!(ban.insert(i, Local::now()).is_none());
} }