Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: avoid duplicating logs on Coder Connect Windows (#19052)
The sinks are already added to the logger above, so they're just getting duplicated
  • Loading branch information
deansheather authored and ethanndickson committed Aug 5, 2025
commit 19171e27c9624c435f97d4ae5e3b61c649bc7063
5 changes: 1 addition & 4 deletions cli/vpndaemon_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
6 changes: 0 additions & 6 deletions vpn/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down