aboutsummaryrefslogtreecommitdiffstats
path: root/worker/imap/idler.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-11-27 11:29:34 +0100
committerRobin Jarry <robin@jarry.cc>2022-12-02 22:10:49 +0100
commit23a05d17ac1d23466ff73efa19576d43d06efe4b (patch)
tree49986587a62bdd89eb06ffa2aadf05f6d45cb3e7 /worker/imap/idler.go
parent70f46757449c8f24b818f4dfc5dcb87da7e327d6 (diff)
downloadaerc-23a05d17ac1d23466ff73efa19576d43d06efe4b.tar.gz
logging: rename package to log
Use the same name than the builtin "log" package. That way, we do not risk logging in the wrong place. Suggested-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'worker/imap/idler.go')
-rw-r--r--worker/imap/idler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/worker/imap/idler.go b/worker/imap/idler.go
index da018334..d099ee88 100644
--- a/worker/imap/idler.go
+++ b/worker/imap/idler.go
@@ -5,7 +5,7 @@ import (
"sync"
"time"
- "git.sr.ht/~rjarry/aerc/logging"
+ "git.sr.ht/~rjarry/aerc/log"
"git.sr.ht/~rjarry/aerc/worker/types"
"github.com/emersion/go-imap"
"github.com/emersion/go-imap/client"
@@ -78,7 +78,7 @@ func (i *idler) Start() {
i.stop = make(chan struct{})
go func() {
- defer logging.PanicHandler()
+ defer log.PanicHandler()
select {
case <-i.stop:
// debounce idle
@@ -146,7 +146,7 @@ func (i *idler) waitOnIdle() {
i.setWaiting(true)
i.log("wait for idle in background")
go func() {
- defer logging.PanicHandler()
+ defer log.PanicHandler()
err := <-i.done
if err == nil {
i.log("<=(idle) waited")
@@ -166,5 +166,5 @@ func (i *idler) waitOnIdle() {
func (i *idler) log(format string, v ...interface{}) {
msg := fmt.Sprintf(format, v...)
- logging.Tracef("idler (%p) [idle:%t,wait:%t] %s", i, i.isIdleing(), i.isWaiting(), msg)
+ log.Tracef("idler (%p) [idle:%t,wait:%t] %s", i, i.isIdleing(), i.isWaiting(), msg)
}