fix(netxlite): http3 transport needs logging by default (#492)
Adapt other places where it was not using a logger to either choose a reasonable logger or disable logging for backwards compat. See https://github.com/ooni/probe/issues/1591
This commit is contained in:
@@ -10,7 +10,15 @@ import (
|
||||
//
|
||||
// New code should use netxlite.NewHTTP3Transport instead.
|
||||
func NewHTTP3Transport(config Config) RoundTripper {
|
||||
return netxlite.NewHTTP3Transport(
|
||||
// Rationale for using NoLogger here: previously this code did
|
||||
// not use a logger as well, so it's fine to keep it as is.
|
||||
return netxlite.NewHTTP3Transport(&NoLogger{},
|
||||
netxlite.NewQUICDialerFromContextDialerAdapter(config.QUICDialer),
|
||||
config.TLSConfig)
|
||||
}
|
||||
|
||||
type NoLogger struct{}
|
||||
|
||||
func (*NoLogger) Debug(message string) {}
|
||||
|
||||
func (*NoLogger) Debugf(format string, v ...interface{}) {}
|
||||
|
||||
Reference in New Issue
Block a user