Skip to content

Commit 4238532

Browse files
committed
fix: reduce tray log noise by changing server state polling to debug level
The "Server state changed" message was logging at INFO every ~3 seconds due to server connection state fluctuations, flooding the log file. Changed to DEBUG since this is routine polling status, not actionable information. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5647518 commit 4238532

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cmd/mcpproxy-tray/internal/api/client.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ import (
2828
// This matches the contracts.HealthStatus struct from the core.
2929
// Spec 013: Health is the single source of truth for server status.
3030
type HealthStatus struct {
31-
Level string `json:"level"` // "healthy", "degraded", "unhealthy"
32-
AdminState string `json:"admin_state"` // "enabled", "disabled", "quarantined"
33-
Summary string `json:"summary"` // e.g., "Connected (5 tools)"
34-
Detail string `json:"detail,omitempty"` // Optional longer explanation
35-
Action string `json:"action,omitempty"` // "login", "restart", "enable", "approve", "set_secret", "configure", "view_logs", ""
31+
Level string `json:"level"` // "healthy", "degraded", "unhealthy"
32+
AdminState string `json:"admin_state"` // "enabled", "disabled", "quarantined"
33+
Summary string `json:"summary"` // e.g., "Connected (5 tools)"
34+
Detail string `json:"detail,omitempty"` // Optional longer explanation
35+
Action string `json:"action,omitempty"` // "login", "restart", "enable", "approve", "set_secret", "configure", "view_logs", ""
3636
}
3737

3838
// Server represents a server from the API
@@ -550,7 +550,7 @@ func (c *Client) GetServers() ([]Server, error) {
550550
"base_url", c.baseURL)
551551
} else if stateChanged {
552552
// Only log when server states actually change
553-
c.logger.Infow("Server state changed",
553+
c.logger.Debugw("Server state changed",
554554
"count", len(result),
555555
"connected", countConnected(result),
556556
"with_health", withHealthCount,

0 commit comments

Comments
 (0)