feat: add logging to agent yamux session (#11912)

Log yamux errors and warnings in the agent.
This commit is contained in:
Spike Curtis
2024-02-01 08:18:13 +04:00
committed by GitHub
parent b0a855caa4
commit 13e214f7f1
+2 -1
View File
@@ -218,7 +218,8 @@ func (c *Client) Listen(ctx context.Context) (drpc.Conn, error) {
},
}
config := yamux.DefaultConfig()
config.LogOutput = io.Discard
config.LogOutput = nil
config.Logger = slog.Stdlib(ctx, c.SDK.Logger(), slog.LevelInfo)
session, err := yamux.Client(netConn, config)
if err != nil {
return nil, xerrors.Errorf("multiplex client: %w", err)