diff options
author | Robin Jarry <robin@jarry.cc> | 2022-11-23 10:43:44 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-12-02 22:10:44 +0100 |
commit | 70f46757449c8f24b818f4dfc5dcb87da7e327d6 (patch) | |
tree | a8650017ccdae1f7a4aebbdf745a0fa4ae2c2286 /commands/msg/recall.go | |
parent | 3cd69ee953b169cf2e61b70948582df4a75cffc5 (diff) | |
download | aerc-70f46757449c8f24b818f4dfc5dcb87da7e327d6.tar.gz |
logging: homogenize levels
The main goal is to ensure that by default, the log file (if configured)
does not grow out of proportions. Most of the logging messages in aerc
are actually for debugging and/or trace purposes.
Define clear rules for logging levels. Enforce these rules everywhere.
After this patch, here is what the log file looks like after starting up
with a single account:
INFO 2022/11/24 20:26:16.147164 aerc.go:176: Starting up version 0.13.0-100-g683981479c60 (go1.18.7 amd64 linux)
INFO 2022/11/24 20:26:17.546448 account.go:254: [work] connected.
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/recall.go')
-rw-r--r-- | commands/msg/recall.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/msg/recall.go b/commands/msg/recall.go index b5c92f21..eb8195f8 100644 --- a/commands/msg/recall.go +++ b/commands/msg/recall.go @@ -70,7 +70,7 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { if err != nil { return errors.Wrap(err, "Recall failed") } - logging.Infof("Recalling message %s", msgInfo.Envelope.MessageId) + logging.Debugf("Recalling message <%s>", msgInfo.Envelope.MessageId) composer, err := widgets.NewComposer(aerc, acct, aerc.Config(), acct.AccountConfig(), acct.Worker(), "", msgInfo.RFC822Headers, @@ -200,7 +200,7 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { } bs, err := msg.BodyStructure().PartAtIndex(p) if err != nil { - logging.Infof("cannot get PartAtIndex %v: %v", p, err) + logging.Warnf("cannot get PartAtIndex %v: %v", p, err) continue } msg.FetchBodyPart(p, func(reader io.Reader) { |