Skip to content

Commit 3866fff

Browse files
committed
fix(forward): log per-connection accept/connect at debug
"new client connected" and "connected to port" fire once per forwarded connection. On workloads that cycle many short-lived connections they flood the logs at info level with routine lifecycle events. Downgrade both to debug, matching the teardown logging.
1 parent bd51cfb commit 3866fff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ios/forward/forward.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func connectionAccept(cl *ConnListener, deviceID int, phonePort uint16) {
7979
golog.Error("error accepting new connection", "module", logModule, "deviceID", deviceID, "phonePort", phonePort, "error", err)
8080
continue
8181
}
82-
golog.Info("new client connected", "module", logModule, "deviceID", deviceID, "phonePort", phonePort, "conn", fmt.Sprintf("%#v", cl))
82+
golog.Debug("new client connected", "module", logModule, "deviceID", deviceID, "phonePort", phonePort, "conn", fmt.Sprintf("%#v", cl))
8383
go StartNewProxyConnection(context.TODO(), clientConn, deviceID, phonePort)
8484
}
8585
}
@@ -98,7 +98,7 @@ func StartNewProxyConnection(ctx context.Context, clientConn io.ReadWriteCloser,
9898
clientConn.Close()
9999
return fmt.Errorf("could not connect to port:%d on iOS: %v", phonePort, err)
100100
}
101-
golog.Info("connected to port", "module", logModule, "deviceID", deviceID, "conn", fmt.Sprintf("%#v", clientConn), "phonePort", phonePort)
101+
golog.Debug("connected to port", "module", logModule, "deviceID", deviceID, "conn", fmt.Sprintf("%#v", clientConn), "phonePort", phonePort)
102102
deviceConn := usbmuxConn.ReleaseDeviceConnection()
103103

104104
proxyConns(ctx, clientConn, deviceConn, deviceID, phonePort)

0 commit comments

Comments
 (0)