From 0ca1240c7556829d0a43b58a5ea608b6b71e79aa Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Jan 2025 04:08:34 -0600 Subject: quiet output --- shell.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'shell.go') diff --git a/shell.go b/shell.go index 2a259a7..0b39f00 100644 --- a/shell.go +++ b/shell.go @@ -18,9 +18,9 @@ func (repo *Repo) Run(cmd []string) cmd.Status { result := shell.PathRun(repo.FullPath, cmd) output := strings.Join(result.Stdout, "\n") if result.Error != nil { - log.Warn("cmd:", cmd) - log.Warn("ouptput:", output) - log.Warn("failed with error:", result.Error) + log.Log(WARN, "cmd:", cmd) + log.Log(WARN, "ouptput:", output) + log.Log(WARN, "failed with error:", result.Error) } return result } @@ -32,13 +32,13 @@ func (repo *Repo) RunQuiet(cmd []string) cmd.Status { func (repo *Repo) RunEcho(cmd []string) cmd.Status { result := shell.PathRunQuiet(repo.FullPath, cmd) - log.Info("cmd:", repo.FullPath, cmd) - log.Warn("cmd.Exit:", result.Exit, "cmd.Error:", result.Error) + log.Log(NOW, "cmd:", repo.FullPath, cmd) + log.Warn(WARN, "cmd.Exit:", result.Exit, "cmd.Error:", result.Error) for _, line := range result.Stdout { - log.Info("STDOUT:", line) + log.Log(NOW, "STDOUT:", line) } for _, line := range result.Stderr { - log.Info("STDERR:", line) + log.Log(NOW, "STDERR:", line) } return result } @@ -48,7 +48,7 @@ func (repo *Repo) RunRealtime(cmd []string) cmd.Status { } func (repo *Repo) RunRealtimeVerbose(cmd []string) cmd.Status { - log.Info("Run:", repo.GetFullPath(), cmd) + log.Log(NOW, "Run:", repo.GetFullPath(), cmd) return shell.PathRunRealtime(repo.GetFullPath(), cmd) } -- cgit v1.2.3