Skip to content

Commit

Permalink
Merge pull request #1642 from imjasonh/qemu-logspam
Browse files Browse the repository at this point in the history
qemu: reduce logspam for qemu runner
  • Loading branch information
imjasonh authored Nov 11, 2024
2 parents aba6d49 + 8bf64b9 commit 54acd72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/container/qemu_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ func (bw *qemu) Name() string {

// Run runs a Qemu task given a Config and command string.
func (bw *qemu) Run(ctx context.Context, cfg *Config, envOverride map[string]string, args ...string) error {
clog.InfoContextf(ctx, "running command %s", strings.Join(args, " "))

log := clog.FromContext(ctx)
log.Debugf("running command %s", strings.Join(args, " "))
stdout, stderr := logwriter.New(log.Info), logwriter.New(log.Warn)
defer stdout.Close()
defer stderr.Close()
Expand Down Expand Up @@ -784,7 +783,7 @@ func sendSSHCommand(ctx context.Context, user, address string,
clog.FromContext(ctx).Infof("running (%d) %v", len(command), cmd)
err = session.Run(cmd)
if err != nil {
clog.FromContext(ctx).Errorf("Failed to run command %v: %s", command, err)
clog.FromContext(ctx).Errorf("Failed to run command: %v", err)
return err
}

Expand Down

0 comments on commit 54acd72

Please sign in to comment.