From 70f46757449c8f24b818f4dfc5dcb87da7e327d6 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 23 Nov 2022 10:43:44 +0100 Subject: 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 Tested-by: Bence Ferdinandy Acked-by: Tim Culverhouse --- config/accounts.go | 2 +- config/binds.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/accounts.go b/config/accounts.go index e168231f..b33bdf09 100644 --- a/config/accounts.go +++ b/config/accounts.go @@ -112,7 +112,7 @@ func (config *AercConfig) parseAccounts(root string, accts []string) error { } } - logging.Infof("Parsing accounts configuration from %s", filename) + logging.Debugf("Parsing accounts configuration from %s", filename) file, err := ini.Load(filename) if err != nil { diff --git a/config/binds.go b/config/binds.go index 4b32e6da..281aebf6 100644 --- a/config/binds.go +++ b/config/binds.go @@ -77,7 +77,7 @@ func (config *AercConfig) parseBinds(root string) error { return err } } - logging.Infof("Parsing key bindings configuration from %s", filename) + logging.Debugf("Parsing key bindings configuration from %s", filename) binds, err := ini.Load(filename) if err != nil { return err -- cgit