From 3c264c623e07e1184e1f48121abab8d36fb5cfea Mon Sep 17 00:00:00 2001 From: Brian McGee Date: Fri, 17 May 2024 09:56:36 +0100 Subject: [PATCH] feat: log out the formatter command being applied at debug level Closes #292 Signed-off-by: Brian McGee --- format/formatter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/format/formatter.go b/format/formatter.go index e8e84539..dbe2f114 100644 --- a/format/formatter.go +++ b/format/formatter.go @@ -83,6 +83,9 @@ func (f *Formatter) Apply(ctx context.Context, files []*walk.File, filter bool) cmd := exec.CommandContext(ctx, f.executable, args...) cmd.Dir = f.workingDir + // log out the command being executed + f.log.Debugf("executing: %s", cmd.String()) + if out, err := cmd.CombinedOutput(); err != nil { if len(out) > 0 { _, _ = fmt.Fprintf(os.Stderr, "%s error:\n%s\n", f.name, out)