Correct debug logging in DNS-over-HTTP transport

Logging there should use Log function to include the request ID if
present. Changes were made unintentionally during the refactoring to
eliminate usage of global logger.

This commits message restores the correct/old behavior.
This commit is contained in:
Cuong Manh Le
2025-07-07 17:36:25 +07:00
committed by Cuong Manh Le
parent a63fa31969
commit f573de851a
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -552,7 +552,7 @@ func (uc *UpstreamConfig) newDOHTransport(ctx context.Context, addrs []string) *
if uc.BootstrapIP != "" {
dialer := net.Dialer{Timeout: dialerTimeout, KeepAlive: dialerTimeout}
addr := net.JoinHostPort(uc.BootstrapIP, port)
logger.Debug().Msgf("sending doh request to: %s", addr)
Log(ctx, logger.Debug(), "sending doh request to: %s", addr)
return dialer.DialContext(ctx, network, addr)
}
pd := &ctrldnet.ParallelDialer{}
@@ -566,7 +566,7 @@ func (uc *UpstreamConfig) newDOHTransport(ctx context.Context, addrs []string) *
if err != nil {
return nil, err
}
logger.Debug().Msgf("sending doh request to: %s", conn.RemoteAddr())
Log(ctx, logger.Debug(), "sending doh request to: %s", conn.RemoteAddr())
return conn, nil
}
runtime.SetFinalizer(transport, func(transport *http.Transport) {