From: Timo Sirainen Date: Thu, 13 Aug 2020 19:49:43 +0000 (+0300) Subject: lib-index: Remove log prefix from cache events X-Git-Tag: 2.3.13~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e02f24ac33d700cbf2e34456d7086f8cb3fe14cf;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Remove log prefix from cache events Index events don't have a prefix either. The parent event likely already contains the mailbox name, which should be enough. It's especially bad using the full filesystem path in the event prefix, because it could be very long. --- diff --git a/src/lib-index/mail-cache.c b/src/lib-index/mail-cache.c index c7197cd4b8..f5422b8f01 100644 --- a/src/lib-index/mail-cache.c +++ b/src/lib-index/mail-cache.c @@ -46,7 +46,7 @@ void mail_cache_set_corrupted(struct mail_cache *cache, const char *fmt, ...) T_BEGIN { const char *reason = t_strdup_vprintf(fmt, va); const char *errstr = t_strdup_printf( - "Deleting corrupted file: %s", reason); + "Deleting corrupted cache: %s", reason); e_error(event_create_passthrough(cache->event)-> set_name("mail_cache_corrupted")-> add_str("reason", reason)->event(), "%s", errstr); @@ -569,8 +569,6 @@ mail_cache_open_or_create_path(struct mail_index *index, const char *path) cache->event = event_create(index->event); event_add_category(cache->event, &event_category_mail_cache); - event_set_append_log_prefix(cache->event, - t_strdup_printf("Cache %s: ", cache->filepath)); cache->dotlock_settings.use_excl_lock = (index->flags & MAIL_INDEX_OPEN_FLAG_DOTLOCK_USE_EXCL) != 0;