Skip to content

Commit

Permalink
dsync: Debug logging improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed May 27, 2016
1 parent f48452d commit 589bc28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/doveadm/dsync/dsync-mailbox-import.c
Expand Up @@ -124,6 +124,10 @@ struct dsync_mailbox_importer {
unsigned int delete_mailbox:1;
};

static const char *dsync_mail_change_type_names[] = {
"save", "expunge", "flag-change"
};

static bool dsync_mailbox_save_newmails(struct dsync_mailbox_importer *importer,
const struct dsync_mail *mail,
struct importer_new_mail *all_newmails,
Expand Down Expand Up @@ -1708,7 +1712,8 @@ int dsync_mailbox_import_change(struct dsync_mailbox_importer *importer,
result = "New mail";
}

imp_debug(importer, "Import change GUID=%s UID=%u hdr_hash=%s result=%s",
imp_debug(importer, "Import change type=%s GUID=%s UID=%u hdr_hash=%s result=%s",
dsync_mail_change_type_names[change->type],
change->guid != NULL ? change->guid : "<unknown>", change->uid,
change->hdr_hash != NULL ? change->hdr_hash : "", result);

Expand Down

0 comments on commit 589bc28

Please sign in to comment.