aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/pipe.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 /commands/msg/pipe.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 'commands/msg/pipe.go')
-rw-r--r--commands/msg/pipe.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/commands/msg/pipe.go b/commands/msg/pipe.go
index 4a5a6168..878fd18c 100644
--- a/commands/msg/pipe.go
+++ b/commands/msg/pipe.go
@@ -10,7 +10,7 @@ import (
"time"
"git.sr.ht/~rjarry/aerc/commands"
- "git.sr.ht/~rjarry/aerc/logging"
+ "git.sr.ht/~rjarry/aerc/log"
"git.sr.ht/~rjarry/aerc/widgets"
mboxer "git.sr.ht/~rjarry/aerc/worker/mbox"
"git.sr.ht/~rjarry/aerc/worker/types"
@@ -92,12 +92,12 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
return
}
go func() {
- defer logging.PanicHandler()
+ defer log.PanicHandler()
defer pipe.Close()
_, err := io.Copy(pipe, reader)
if err != nil {
- logging.Errorf("failed to send data to pipe: %v", err)
+ log.Errorf("failed to send data to pipe: %v", err)
}
}()
err = ecmd.Run()
@@ -166,7 +166,7 @@ func (Pipe) Execute(aerc *widgets.Aerc, args []string) error {
})
go func() {
- defer logging.PanicHandler()
+ defer log.PanicHandler()
select {
case <-done:
@@ -245,7 +245,7 @@ func newMessagesReader(messages []*types.FullMessage, useMbox bool) io.Reader {
_, err = io.Copy(pw, msg.Content.Reader)
}
if err != nil {
- logging.Warnf("failed to write data: %v", err)
+ log.Warnf("failed to write data: %v", err)
}
}
}()