From e6fd83d00d9b73a9cdcc48f40698d3b4003531ad Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Thu, 13 Jun 2024 20:24:03 +0300 Subject: [PATCH] logging: reduce debug logging a bit --- lib/message/mu-message.cc | 4 +--- lib/mu-contacts-cache.cc | 7 ++++--- lib/mu-maildir.cc | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/message/mu-message.cc b/lib/message/mu-message.cc index ee692b4e..46063cfe 100644 --- a/lib/message/mu-message.cc +++ b/lib/message/mu-message.cc @@ -563,9 +563,7 @@ process_message(const MimeMessage& mime_msg, const std::string& path, if (info.body_txt) { /* attempt to get the body-language */ if (const auto lang{detect_language(info.body_txt.value())}; lang) { info.language = lang->code; - mu_debug("detected language: {}", lang->code); - } else - mu_debug("could not detect language"); + } } #endif /*HAVE_CLD2*/ } diff --git a/lib/mu-contacts-cache.cc b/lib/mu-contacts-cache.cc index b9b9b50f..eaa5b1fa 100644 --- a/lib/mu-contacts-cache.cc +++ b/lib/mu-contacts-cache.cc @@ -194,10 +194,11 @@ ContactsCache::serialize() const void ContactsCache::add(Contact&& contact) { - /* we do _not_ cache invalid email addresses, so we won't offer them in completions etc. It - * should be _rare_, but we've seen cases ( broken local messages) */ + /* we do _not_ cache invalid email addresses, so we won't offer them in + * completions etc. It should be _rare_, but we've seen cases ( broken + * local messages, and various "fake" messages RSS2Imap etc. */ if (!is_valid(contact.email)) { - mu_warning("not caching invalid e-mail address '{}'", contact.email); + mu_debug("not caching invalid e-mail address '{}'", contact.email); return; } diff --git a/lib/mu-maildir.cc b/lib/mu-maildir.cc index 5166b17e..5eef69e5 100644 --- a/lib/mu-maildir.cc +++ b/lib/mu-maildir.cc @@ -264,8 +264,6 @@ msg_move_verify(const std::string& src, const std::string& dst) mu_debug("source is still there ({}->{})", src, dst); } - mu_debug("moved {} -> {}", src, dst); - return Ok(); } /* LCOV_EXCL_STOP*/ @@ -430,7 +428,6 @@ Mu::maildir_determine_target(const std::string& old_path, if (const auto checked{check_determine_target_params( old_path, root_maildir_path, target_maildir, newflags)}; !checked) return Err(Error{std::move(checked.error())}); - /* * this gets us the source maildir filesystem path, the directory * in which new/ & cur/ lives, and the source file