From f42718328ef2060936e43be59fef908e1fc91452 Mon Sep 17 00:00:00 2001 From: Jeremiah Russell Date: Mon, 6 Oct 2025 17:03:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(trash):=20improve?= =?UTF-8?q?=20trash=20operation=20logging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - change debug log level to trace for batch request - remove debug log for response - log message subject instead of id after trashing --- src/trash.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/trash.rs b/src/trash.rs index 6d1dc6b..ab5f561 100644 --- a/src/trash.rs +++ b/src/trash.rs @@ -54,9 +54,9 @@ impl Trash { remove_label_ids, }; - log::debug!("{batch_request:#?}"); + log::trace!("{batch_request:#?}"); - let res = self + let _res = self .message_list .hub() .users() @@ -66,11 +66,8 @@ impl Trash { .await .map_err(Box::new)?; - log::debug!("{res:#?}"); - - for id in self.message_list.message_ids() { - // log::info!("Message with subject `{subject}` move to trash."); - log::info!("Message with id `{id}` moved to trash."); + for m in self.message_list.messages() { + log::info!("Message with subject `{}` move to trash.", m.subject()); } Ok(())