From: Timo Sirainen Date: Thu, 27 Oct 2022 22:20:43 +0000 (+0300) Subject: doveadm-server: Log dsync's "desync" message with debug level X-Git-Tag: 2.4.0~3473 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2e98962b883d48939063212092569f41dd54e05;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: Log dsync's "desync" message with debug level Previously this was logged only by the CLI doveadm tool as a warning. --- diff --git a/src/doveadm/doveadm-dsync.c b/src/doveadm/doveadm-dsync.c index b78916ee95..fa681019d1 100644 --- a/src/doveadm/doveadm-dsync.c +++ b/src/doveadm/doveadm-dsync.c @@ -828,14 +828,16 @@ cmd_dsync_run(struct doveadm_mail_cmd_context *_ctx, struct mail_user *user) if (changes_during_sync != NULL || changes_during_sync2 != NULL) { /* don't log a warning when running via doveadm server (e.g. called by replicator) */ - if (cctx->conn_type == DOVEADM_CONNECTION_TYPE_CLI) { - e_warning(cctx->event, - "Mailbox changes caused a desync. " - "You may want to run dsync again: %s", - changes_during_sync == NULL || - (remote_only_changes && changes_during_sync2 != NULL) ? - changes_during_sync2 : changes_during_sync); - } + const char *msg = t_strdup_printf( + "Mailbox changes caused a desync. " + "You may want to run dsync again: %s", + changes_during_sync == NULL || + (remote_only_changes && changes_during_sync2 != NULL) ? + changes_during_sync2 : changes_during_sync); + if (cctx->conn_type == DOVEADM_CONNECTION_TYPE_CLI) + e_warning(cctx->event, "%s", msg); + else + e_debug(cctx->event, "%s", msg); ctx->ctx.exit_code = DOVEADM_EX_CHANGED; } if (dsync_brain_deinit(&brain, &mail_error2) < 0)