fix: avoid duplicating logs on Coder Connect Windows (#19052)

The sinks are already added to the logger above, so they're just getting duplicated
This commit is contained in:
Dean Sheather
2025-07-28 14:02:00 +10:00
committed by GitHub
parent 8d6cc51da9
commit 2a430ab435
2 changed files with 1 additions and 10 deletions
+1 -4
View File
@@ -63,10 +63,7 @@ func (r *RootCmd) vpnDaemonRun() *serpent.Command {
defer pipe.Close()
logger.Info(ctx, "starting tunnel")
tunnel, err := vpn.NewTunnel(ctx, logger, pipe, vpn.NewClient(),
vpn.UseOSNetworkingStack(),
vpn.UseCustomLogSinks(sinks...),
)
tunnel, err := vpn.NewTunnel(ctx, logger, pipe, vpn.NewClient(), vpn.UseOSNetworkingStack())
if err != nil {
return xerrors.Errorf("create new tunnel for client: %w", err)
}
-6
View File
@@ -192,12 +192,6 @@ func UseAsLogger() TunnelOption {
}
}
func UseCustomLogSinks(sinks ...slog.Sink) TunnelOption {
return func(t *Tunnel) {
t.clientLogger = t.clientLogger.AppendSinks(sinks...)
}
}
func WithClock(clock quartz.Clock) TunnelOption {
return func(t *Tunnel) {
t.clock = clock