From d695012e40570b64055b06d020c757909366fc54 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Mon, 26 Oct 2015 10:35:51 -0700 Subject: [PATCH] Adding a debug log to indicate the exit code of failed check --- command/agent/check.go | 1 + 1 file changed, 1 insertion(+) diff --git a/command/agent/check.go b/command/agent/check.go index d0f5f61e5b..01526e8089 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -616,6 +616,7 @@ func (c *CheckDocker) check() { if execInfo.ExitCode == 0 { c.Notify.UpdateCheck(c.CheckID, structs.HealthPassing, fmt.Sprintf("Script execution %s: Success", c.Script)) } else { + c.Logger.Printf("[DEBUG] Check failed with exit code: %d", execInfo.ExitCode) c.Notify.UpdateCheck(c.CheckID, structs.HealthCritical, fmt.Sprintf("Script execution faied with exit code: %s", execInfo.ExitCode)) }