mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
use the prefix logger for client, server and proxy
This commit is contained in:
parent
d06957b8d8
commit
6b82e46e0c
5 changed files with 5 additions and 5 deletions
|
@ -112,7 +112,7 @@ func Dial(
|
|||
tlsConf: tlsConf,
|
||||
config: clientConfig,
|
||||
version: version,
|
||||
logger: utils.DefaultLogger,
|
||||
logger: utils.DefaultLogger.WithPrefix("client"),
|
||||
}
|
||||
|
||||
c.logger.Infof("Starting new connection to %s (%s -> %s), source connection ID %s, destination connection ID %s, version %s", hostname, c.conn.LocalAddr(), c.conn.RemoteAddr(), c.srcConnID, c.destConnID, c.version)
|
||||
|
|
|
@ -77,7 +77,7 @@ func newClient(
|
|||
opts: opts,
|
||||
headerErrored: make(chan struct{}),
|
||||
dialer: dialer,
|
||||
logger: utils.DefaultLogger,
|
||||
logger: utils.DefaultLogger.WithPrefix("client"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ func (s *Server) serveImpl(tlsConfig *tls.Config, conn net.PacketConn) error {
|
|||
if s.Server == nil {
|
||||
return errors.New("use of h2quic.Server without http.Server")
|
||||
}
|
||||
s.logger = utils.DefaultLogger
|
||||
s.logger = utils.DefaultLogger.WithPrefix("server")
|
||||
s.listenerMutex.Lock()
|
||||
if s.closed {
|
||||
s.listenerMutex.Unlock()
|
||||
|
|
|
@ -134,7 +134,7 @@ func NewQuicProxy(local string, version protocol.VersionNumber, opts *Opts) (*Qu
|
|||
dropPacket: packetDropper,
|
||||
delayPacket: packetDelayer,
|
||||
version: version,
|
||||
logger: utils.DefaultLogger,
|
||||
logger: utils.DefaultLogger.WithPrefix("proxy"),
|
||||
}
|
||||
|
||||
p.logger.Debugf("Starting UDP Proxy %s <-> %s", conn.LocalAddr(), raddr)
|
||||
|
|
|
@ -110,7 +110,7 @@ func Listen(conn net.PacketConn, tlsConf *tls.Config, config *Config) (Listener,
|
|||
sessionQueue: make(chan Session, 5),
|
||||
errorChan: make(chan struct{}),
|
||||
supportsTLS: supportsTLS,
|
||||
logger: utils.DefaultLogger,
|
||||
logger: utils.DefaultLogger.WithPrefix("server"),
|
||||
}
|
||||
if supportsTLS {
|
||||
if err := s.setupTLS(); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue