Skip to content

Commit 2a430ab

Browse files
authored
fix: avoid duplicating logs on Coder Connect Windows (#19052)
The sinks are already added to the logger above, so they're just getting duplicated
1 parent 8d6cc51 commit 2a430ab

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

cli/vpndaemon_windows.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ func (r *RootCmd) vpnDaemonRun() *serpent.Command {
6363
defer pipe.Close()
6464

6565
logger.Info(ctx, "starting tunnel")
66-
tunnel, err := vpn.NewTunnel(ctx, logger, pipe, vpn.NewClient(),
67-
vpn.UseOSNetworkingStack(),
68-
vpn.UseCustomLogSinks(sinks...),
69-
)
66+
tunnel, err := vpn.NewTunnel(ctx, logger, pipe, vpn.NewClient(), vpn.UseOSNetworkingStack())
7067
if err != nil {
7168
return xerrors.Errorf("create new tunnel for client: %w", err)
7269
}

vpn/tunnel.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,6 @@ func UseAsLogger() TunnelOption {
192192
}
193193
}
194194

195-
func UseCustomLogSinks(sinks ...slog.Sink) TunnelOption {
196-
return func(t *Tunnel) {
197-
t.clientLogger = t.clientLogger.AppendSinks(sinks...)
198-
}
199-
}
200-
201195
func WithClock(clock quartz.Clock) TunnelOption {
202196
return func(t *Tunnel) {
203197
t.clock = clock

0 commit comments

Comments
 (0)