fix debugf log formatting for exit code

pull/5/head
Brad Rydzewski 4 years ago
parent 1bd1ae3f96
commit 9cb95ca135

@ -249,7 +249,7 @@ func (e *Execer) exec(ctx context.Context, state *pipeline.State, spec Spec, ste
log.Debugln("received oom kill.")
state.Finish(step.GetName(), 137)
} else {
log.Debugln("received exit code %d", exited.ExitCode)
log.Debugf("received exit code %d", exited.ExitCode)
state.Finish(step.GetName(), exited.ExitCode)
}
err := e.reporter.ReportStep(noContext, state, step.GetName())

@ -279,8 +279,8 @@ func (s *Runner) run(ctx context.Context, stage *drone.Stage, data *client.Conte
log.Debug("updated stage to running")
ctxcancel = logger.WithContext(ctxcancel, log)
err = s.Exec(ctxcancel, spec, state)
ctxlogger := logger.WithContext(ctxcancel, log)
err = s.Exec(ctxlogger, spec, state)
if err != nil {
log.WithError(err).
WithField("duration", stage.Stopped-stage.Started).

Loading…
Cancel
Save