mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user