From b35836fdade7f4e84ae127e7a9f516f1a8f71936 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 d0f5f61e5..01526e808 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)) }