Skip to content

Commit 13e214f

Browse files
authored
feat: add logging to agent yamux session (#11912)
Log yamux errors and warnings in the agent.
1 parent b0a855c commit 13e214f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

codersdk/agentsdk/agentsdk.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ func (c *Client) Listen(ctx context.Context) (drpc.Conn, error) {
218218
},
219219
}
220220
config := yamux.DefaultConfig()
221-
config.LogOutput = io.Discard
221+
config.LogOutput = nil
222+
config.Logger = slog.Stdlib(ctx, c.SDK.Logger(), slog.LevelInfo)
222223
session, err := yamux.Client(netConn, config)
223224
if err != nil {
224225
return nil, xerrors.Errorf("multiplex client: %w", err)

0 commit comments

Comments
 (0)