aboutsummaryrefslogtreecommitdiff
path: root/completer
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 /completer
parent70f46757449c8f24b818f4dfc5dcb87da7e327d6 (diff)
downloadaerc-23a05d17ac1d23466ff73efa19576d43d06efe4b.tar.gz
aerc-23a05d17ac1d23466ff73efa19576d43d06efe4b.zip
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 'completer')
-rw-r--r--completer/completer.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/completer/completer.go b/completer/completer.go
index 131063e7..9b237fa8 100644
--- a/completer/completer.go
+++ b/completer/completer.go
@@ -12,7 +12,7 @@ import (
"strings"
"syscall"
- "git.sr.ht/~rjarry/aerc/logging"
+ "git.sr.ht/~rjarry/aerc/log"
"github.com/google/shlex"
)
@@ -110,7 +110,7 @@ func (c *Completer) completeAddress(s string) ([]string, string, error) {
// make sure to kill the process *and* all its children
//nolint:errcheck // who cares?
syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
- logging.Warnf("command %s killed: %s", cmd, err)
+ log.Warnf("command %s killed: %s", cmd, err)
}
if err != nil && !errors.Is(err, tooManyLines) {
buf, _ := io.ReadAll(stderr)
@@ -176,8 +176,7 @@ func readCompletions(r io.Reader) ([]string, error) {
parts := strings.SplitN(line, "\t", 3)
addr, err := mail.ParseAddress(strings.TrimSpace(parts[0]))
if err != nil {
- logging.Warnf(
- "line %d: %#v: could not parse address: %v",
+ log.Warnf("line %d: %#v: could not parse address: %v",
line, err)
continue
}
@@ -186,8 +185,7 @@ func readCompletions(r io.Reader) ([]string, error) {
}
decoded, err := decodeMIME(addr.String())
if err != nil {
- logging.Warnf(
- "line %d: %#v: could not decode MIME string: %v",
+ log.Warnf("line %d: %#v: could not decode MIME string: %v",
i+1, line, err)
continue
}