GODT-1041 Log IMAP requests to debug Apple Mail re-sync issue

This commit is contained in:
Michal Horejsek
2021-02-15 08:32:58 +01:00
parent fb89fb7b31
commit 7bb7e1a518
3 changed files with 62 additions and 2 deletions

View File

@ -66,7 +66,13 @@ func (dnc *doNotCacheError) errorOrNil() error {
//
// If the Backend implements Updater, it must notify the client immediately
// via a mailbox update.
func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error { // nolint[funlen]
func (im *imapMailbox) CreateMessage(flags []string, date time.Time, body imap.Literal) error {
return im.logCommand(func() error {
return im.createMessage(flags, date, body)
}, "APPEND", flags, date)
}
func (im *imapMailbox) createMessage(flags []string, date time.Time, body imap.Literal) error { // nolint[funlen]
// Called from go-imap in goroutines - we need to handle panics for each function.
defer im.panicHandler.HandlePanic()