types/logger: trim spaces from the rate-limited example message.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/1171/head
David Anderson 4 years ago
parent b405644f5d
commit 78338ac029

@ -132,7 +132,7 @@ func RateLimitedFn(logf Logf, f time.Duration, burst int, maxCache int) Logf {
logf(format, args...)
case warn:
// For the warning, log the specific format string
logf("[RATE LIMITED] format string \"%s\" (example: \"%s\")", format, fmt.Sprintf(format, args...))
logf("[RATE LIMITED] format string \"%s\" (example: \"%s\")", format, strings.TrimSpace(fmt.Sprintf(format, args...)))
}
}
}

Loading…
Cancel
Save