summary refs log tree commit diff stats
path: root/worker/worker.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-31 21:18:21 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-31 21:18:21 -0500
commita21afdaa6bab8f6d05bbe9272700eef571548a59 (patch)
tree82149576ffdb6c13bf1a1ac2f1abb729e79cf3c9 /worker/worker.go
parent1710c9054898e820700d673e21e7c7a90a3f67b1 (diff)
downloadaerc-a21afdaa6bab8f6d05bbe9272700eef571548a59.tar.gz
Improve logging
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/worker.go b/worker/worker.go
index c8ec622..b665884 100644
--- a/worker/worker.go
+++ b/worker/worker.go
@@ -5,6 +5,7 @@ import (
 	"git.sr.ht/~sircmpwn/aerc2/worker/types"
 
 	"fmt"
+	"log"
 	"net/url"
 )
 
@@ -15,7 +16,7 @@ type Worker interface {
 }
 
 // Guesses the appropriate worker type based on the given source string
-func NewWorker(source string) (Worker, error) {
+func NewWorker(source string, logger *log.Logger) (Worker, error) {
 	u, err := url.Parse(source)
 	if err != nil {
 		return nil, err
@@ -23,7 +24,7 @@ func NewWorker(source string) (Worker, error) {
 	switch u.Scheme {
 	case "imap":
 	case "imaps":
-		return imap.NewIMAPWorker(), nil
+		return imap.NewIMAPWorker(logger), nil
 	}
 	return nil, fmt.Errorf("Unknown backend %s", u.Scheme)
 }