Skip to content

Commit

Permalink
Fix check action log
Browse files Browse the repository at this point in the history
  • Loading branch information
mechairoi committed Nov 14, 2017
1 parent e23e36d commit 6c74f83
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,14 +415,11 @@ func runChecker(checker *checks.Checker, checkReportCh chan *checks.Report, repo
if checker.Config.Action != nil {
env := []string{fmt.Sprintf("MACKEREL_STATUS=%s", report.Status), fmt.Sprintf("MACKEREL_PREVIOUS_STATUS=%s", lastStatus)}
go func() {
_, stderr, _, err := checker.Config.Action.RunWithEnv(env)
_, stderr, _, _ := checker.Config.Action.RunWithEnv(env)

if stderr != "" {
logger.Warningf("Checker %q action output stderr: %s", checker.Name, stderr)
}
if err != nil {
logger.Errorf("Checker %q action failed: %s", checker.Name, err)
}
}()
}

Expand Down

0 comments on commit 6c74f83

Please sign in to comment.