Skip to content

Commit

Permalink
log the output of a failed command (check or reload)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeavyHorst committed Nov 5, 2016
1 parent 5e112aa commit 3be9d39
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions template/process_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func (s *ProcessConfig) check(stageFile string) error {
c := exec.Command("/bin/sh", "-c", cmdBuffer.String())
output, err := c.CombinedOutput()
if err != nil {
log.Error(fmt.Sprintf("%q", string(output)))
return err
}
log.Debug(fmt.Sprintf("%q", string(output)))
Expand All @@ -93,6 +94,7 @@ func (s *ProcessConfig) reload() error {
c := exec.Command("/bin/sh", "-c", s.ReloadCmd)
output, err := c.CombinedOutput()
if err != nil {
log.Error(fmt.Sprintf("%q", string(output)))
return err
}
log.Debug(fmt.Sprintf("%q", string(output)))
Expand Down

0 comments on commit 3be9d39

Please sign in to comment.