platformtest: logging-related refactorings

This commit is contained in:
Christian Schwarz
2019-10-14 17:32:58 +02:00
parent b422e6f12e
commit f8f9fd11cd
5 changed files with 12 additions and 10 deletions

View File

@@ -32,7 +32,7 @@ func (e *ex) runNoOutput(expectSuccess bool, ctx context.Context, cmd string, ar
buf, _ := circlog.NewCircularLog(32 << 10)
ecmd.Stdout, ecmd.Stderr = buf, buf
err := ecmd.Run()
log.Printf("command output: %s", buf.String())
log.WithField("output", buf.String()).Debug("command output")
if _, ok := err.(*exec.ExitError); err != nil && !ok {
panic(err)
}