aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/checkmail.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-06-04 21:52:51 +0200
committerRobin Jarry <robin@jarry.cc>2023-06-12 11:23:08 +0200
commit13e356c4a4a296edea4245fb8850aeba49ae1851 (patch)
tree4bef7eef06ea554b82c16cace41eb9b9c5109459 /worker/imap/checkmail.go
parent68e1809b3c602f2119505df78eea3d1d93854f83 (diff)
downloadaerc-13e356c4a4a296edea4245fb8850aeba49ae1851.tar.gz
imap: use named logger
Use the worker's logging functions to have all imap related messages prefixed by the account name. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Inwit <inwit@sindominio.net>
Diffstat (limited to 'worker/imap/checkmail.go')
-rw-r--r--worker/imap/checkmail.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/worker/imap/checkmail.go b/worker/imap/checkmail.go
index 76da58ad..b457dc4c 100644
--- a/worker/imap/checkmail.go
+++ b/worker/imap/checkmail.go
@@ -1,7 +1,6 @@
package imap
import (
- "git.sr.ht/~rjarry/aerc/log"
"git.sr.ht/~rjarry/aerc/models"
"git.sr.ht/~rjarry/aerc/worker/types"
"github.com/emersion/go-imap"
@@ -21,7 +20,7 @@ func (w *IMAPWorker) handleCheckMailMessage(msg *types.CheckMail) {
)
switch {
case w.liststatus:
- log.Tracef("Checking mail with LIST-STATUS")
+ w.worker.Tracef("Checking mail with LIST-STATUS")
statuses, err = w.client.liststatus.ListStatus("", "*", items, nil)
if err != nil {
w.worker.PostMessage(&types.Error{
@@ -36,7 +35,7 @@ func (w *IMAPWorker) handleCheckMailMessage(msg *types.CheckMail) {
remaining = append(remaining, dir)
continue
}
- log.Tracef("Getting status of directory %s", dir)
+ w.worker.Tracef("Getting status of directory %s", dir)
status, err := w.client.Status(dir, items)
if err != nil {
w.worker.PostMessage(&types.Error{