]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Log unhibernation debug message only with mail_debug=yes
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 27 May 2018 12:48:42 +0000 (15:48 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 4 Jun 2018 09:44:04 +0000 (12:44 +0300)
src/imap/imap-state.c

index 83e05061b7b522d8b2a7f1d63b37cf7788f09baf..e2df34e586c90e0c42e8df860fa8f1e087f80133 100644 (file)
@@ -686,9 +686,11 @@ import_state_mailbox_open(struct client *client,
                        status.highest_modseq));
                client->sync_last_full_modseq = status.highest_modseq;
        }
-       i_debug("Unhibernation sync: %u expunges, %u new messages, %u flag changes, %"PRIu64" modseq changes",
-               expunge_count, new_mails_count, flag_change_count,
-               status.highest_modseq - state->highest_modseq);
+       if (client->user->mail_debug) {
+               i_debug("Unhibernation sync: %u expunges, %u new messages, %u flag changes, %"PRIu64" modseq changes",
+                       expunge_count, new_mails_count, flag_change_count,
+                       status.highest_modseq - state->highest_modseq);
+       }
        return 0;
 }