From 7ad91047a4c306b42d72cc203161dbb79e7bc105 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Oct 2025 19:18:34 +0000 Subject: [PATCH 1/2] Initial plan From d8844f956109fbd9df344199d0760a0ccc8c1936 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 27 Oct 2025 19:23:34 +0000 Subject: [PATCH 2/2] Fix build error: replace Warnf with structured logging in OnConnectionWarning Co-authored-by: leggetter <328367+leggetter@users.noreply.github.com> --- pkg/listen/proxy/renderer_interactive.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/listen/proxy/renderer_interactive.go b/pkg/listen/proxy/renderer_interactive.go index 5f37458..12e3207 100644 --- a/pkg/listen/proxy/renderer_interactive.go +++ b/pkg/listen/proxy/renderer_interactive.go @@ -202,9 +202,12 @@ func (r *InteractiveRenderer) OnEventError(eventID string, attempt *websocket.At // OnConnectionWarning is called when approaching connection limits func (r *InteractiveRenderer) OnConnectionWarning(activeRequests int32, maxConns int) { // In interactive mode, warnings could be shown in TUI - // For now, just log it - log.WithField("prefix", "proxy.InteractiveRenderer"). - Warnf("High connection load detected: %d active requests (limit: %d) --max-connections=%d to increase the limit", activeRequests, maxConns) + // Use structured logging to avoid format-string mismatches and make logs machine-readable + log.WithFields(log.Fields{ + "prefix": "proxy.InteractiveRenderer", + "active_requests": activeRequests, + "max_connections": maxConns, + }).Warn("High connection load detected; consider increasing --max-connections") } // Cleanup gracefully stops the TUI and restores terminal