]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Remove log prefix from cache events
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 13 Aug 2020 19:49:43 +0000 (22:49 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 14 Aug 2020 09:05:26 +0000 (12:05 +0300)
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.

src/lib-index/mail-cache.c

index c7197cd4b8550b0725bc2b17db1611018acd8d99..f5422b8f01a27519b7060dee76bc886a6cd3bbb5 100644 (file)
@@ -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;