From 8ea976d3ff483ff3b9e10215cf3f110be482ce8b Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Fri, 28 Jul 2023 17:14:45 +0200 Subject: [PATCH] mysqlctl: Reduce logging for running commands (#13659) Signed-off-by: Dirkjan Bussink --- go/vt/mysqlctl/mysqld.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/go/vt/mysqlctl/mysqld.go b/go/vt/mysqlctl/mysqld.go index 8c227301233..15ced99bfa8 100644 --- a/go/vt/mysqlctl/mysqld.go +++ b/go/vt/mysqlctl/mysqld.go @@ -575,7 +575,6 @@ func (mysqld *Mysqld) Shutdown(ctx context.Context, cnf *Mycnf, waitForMysqld bo // If input is not nil, pipe it to the command's stdin. func execCmd(name string, args, env []string, dir string, input io.Reader) (cmd *exec.Cmd, output string, err error) { cmdPath, _ := exec.LookPath(name) - log.Infof("execCmd: %v %v %v", name, cmdPath, args) cmd = exec.Command(cmdPath, args...) cmd.Env = env @@ -586,10 +585,9 @@ func execCmd(name string, args, env []string, dir string, input io.Reader) (cmd out, err := cmd.CombinedOutput() output = string(out) if err != nil { - log.Infof("execCmd: %v failed: %v", name, err) - err = fmt.Errorf("%v: %v, output: %v", name, err, output) + log.Errorf("execCmd: %v failed: %v", name, err) + err = fmt.Errorf("%v: %w, output: %v", name, err, output) } - log.Infof("execCmd: %v output: %v", name, output) return cmd, output, err }