Tweaks formatting of inline output messages.
This commit is contained in:
parent
d709ef537b
commit
bfe6f073fe
|
@ -207,7 +207,7 @@ func (s *HTTPServer) AgentCheckUpdate(resp http.ResponseWriter, req *http.Reques
|
||||||
|
|
||||||
total := len(update.Output)
|
total := len(update.Output)
|
||||||
if total > CheckBufSize {
|
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)
|
update.Output[:CheckBufSize], CheckBufSize, total)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -283,10 +283,10 @@ func (c *CheckTTL) getExpiredOutput() string {
|
||||||
|
|
||||||
const prefix = "TTL expired"
|
const prefix = "TTL expired"
|
||||||
if c.lastOutput == "" {
|
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,
|
// SetStatus is used to update the status of the check,
|
||||||
|
|
Loading…
Reference in New Issue