From 5dd7ea5d5979808484e0f5ab8f1d7aaf9f65f2f2 Mon Sep 17 00:00:00 2001 From: Bence Ferdinandy Date: Fri, 13 Jan 2023 15:23:06 +0100 Subject: logging: add trace to every command call A previous commit introduced a trace loglevel, but aerc doesn't make much use of it. Logging is not very informative either. Add a log.Tracef to every command and log the provided arguments as well. Signed-off-by: Bence Ferdinandy Acked-by: Robin Jarry --- commands/commands.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commands') diff --git a/commands/commands.go b/commands/commands.go index 1aa8e1af..6fe30592 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -8,6 +8,7 @@ import ( "github.com/google/shlex" + "git.sr.ht/~rjarry/aerc/log" "git.sr.ht/~rjarry/aerc/widgets" ) @@ -69,6 +70,7 @@ func (cmds *Commands) ExecuteCommand(aerc *widgets.Aerc, args []string) error { return errors.New("Expected a command.") } if cmd, ok := cmds.dict()[args[0]]; ok { + log.Tracef("executing command %v", args) return cmd.Execute(aerc, args) } return NoSuchCommand(args[0]) -- cgit