Skip to content

Commit 126813f

Browse files
committed
Use s logger
1 parent 3ea3e70 commit 126813f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

agent/agentssh/agentssh.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ func NewServer(ctx context.Context, logger slog.Logger, maxTimeout time.Duration
8989
"session": ssh.DefaultSessionHandler,
9090
},
9191
ConnectionFailedCallback: func(_ net.Conn, err error) {
92-
logger.Info(ctx, "ssh connection ended", slog.Error(err))
92+
s.logger.Info(ctx, "ssh connection ended", slog.Error(err))
9393
},
9494
Handler: s.sessionHandler,
9595
HostSigners: []ssh.Signer{randomSigner},
9696
LocalPortForwardingCallback: func(ctx ssh.Context, destinationHost string, destinationPort uint32) bool {
9797
// Allow local port forwarding all!
98-
logger.Debug(ctx, "local port forward",
98+
s.logger.Debug(ctx, "local port forward",
9999
slog.F("destination-host", destinationHost),
100100
slog.F("destination-port", destinationPort))
101101
return true
@@ -105,7 +105,7 @@ func NewServer(ctx context.Context, logger slog.Logger, maxTimeout time.Duration
105105
},
106106
ReversePortForwardingCallback: func(ctx ssh.Context, bindHost string, bindPort uint32) bool {
107107
// Allow reverse port forwarding all!
108-
logger.Debug(ctx, "local port forward",
108+
s.logger.Debug(ctx, "local port forward",
109109
slog.F("bind-host", bindHost),
110110
slog.F("bind-port", bindPort))
111111
return true

0 commit comments

Comments
 (0)