Adding a debug log to indicate the exit code of failed check

This commit is contained in:
Diptanu Choudhury 2015-10-26 10:35:51 -07:00
parent a68c6cbd3d
commit b35836fdad
1 changed files with 1 additions and 0 deletions

View File

@ -616,6 +616,7 @@ func (c *CheckDocker) check() {
if execInfo.ExitCode == 0 { if execInfo.ExitCode == 0 {
c.Notify.UpdateCheck(c.CheckID, structs.HealthPassing, fmt.Sprintf("Script execution %s: Success", c.Script)) c.Notify.UpdateCheck(c.CheckID, structs.HealthPassing, fmt.Sprintf("Script execution %s: Success", c.Script))
} else { } 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)) c.Notify.UpdateCheck(c.CheckID, structs.HealthCritical, fmt.Sprintf("Script execution faied with exit code: %s", execInfo.ExitCode))
} }