From cd1999555714fb886493d2d04b6c472be55cebef Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 19 Jul 2022 22:31:51 +0200 Subject: logging: use level-based logger functions Do not pass logger objects around anymore. Shuffle some messages to make them consistent with the new logging API. Avoid using %v when a more specific verb exists for the argument types. The loggers are completely disabled (i.e. Sprintf is not even called) by default. They are only enabled when redirecting stdout to a file. Signed-off-by: Robin Jarry Acked-by: Moritz Poldrack --- widgets/msglist.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'widgets/msglist.go') diff --git a/widgets/msglist.go b/widgets/msglist.go index e9603cae..a190c184 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -2,7 +2,6 @@ package widgets import ( "fmt" - "log" "math" "strings" @@ -22,7 +21,6 @@ type MessageList struct { ui.Invalidatable Scrollable conf *config.AercConfig - logger *log.Logger height int nmsgs int spinner *Spinner @@ -31,10 +29,9 @@ type MessageList struct { aerc *Aerc } -func NewMessageList(conf *config.AercConfig, logger *log.Logger, aerc *Aerc) *MessageList { +func NewMessageList(conf *config.AercConfig, aerc *Aerc) *MessageList { ml := &MessageList{ conf: conf, - logger: logger, spinner: NewSpinner(&conf.Ui), isInitalizing: true, aerc: aerc, -- cgit