mirror of
https://github.com/status-im/consul.git
synced 2025-02-23 02:48:19 +00:00
Tweaks formatting of inline output messages.
This commit is contained in:
parent
70575002d9
commit
f46fa33278
@ -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…
x
Reference in New Issue
Block a user