Tweaks formatting of inline output messages.

This commit is contained in:
James Phillips 2016-03-02 19:47:00 -08:00
parent d709ef537b
commit bfe6f073fe
2 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,7 @@ func (s *HTTPServer) AgentCheckUpdate(resp http.ResponseWriter, req *http.Reques
total := len(update.Output)
if total > CheckBufSize {
update.Output = fmt.Sprintf("%s\n...\nCaptured %d of %d bytes",
update.Output = fmt.Sprintf("%s ... (captured %d of %d bytes)",
update.Output[:CheckBufSize], CheckBufSize, total)
}

View File

@ -283,10 +283,10 @@ func (c *CheckTTL) getExpiredOutput() string {
const prefix = "TTL expired"
if c.lastOutput == "" {
return fmt.Sprintf("%s (no output was available before timeout)", prefix)
return prefix
}
return fmt.Sprintf("%s (last output before timeout follows)\n\n%s", prefix, c.lastOutput)
return fmt.Sprintf("%s (last output before timeout follows): %s", prefix, c.lastOutput)
}
// SetStatus is used to update the status of the check,