mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
Log with context to associate all log by traceID (#1413)
* Log with context to associate all log by traceID
This commit is contained in:
@ -320,7 +320,7 @@ func (p *ConnPool) popIdle() *Conn {
|
||||
|
||||
func (p *ConnPool) Put(cn *Conn) {
|
||||
if cn.rd.Buffered() > 0 {
|
||||
internal.Logger.Printf("Conn has unread data")
|
||||
internal.Logger.Printf(context.Background(), "Conn has unread data")
|
||||
p.Remove(cn, BadConnError{})
|
||||
return
|
||||
}
|
||||
@ -458,7 +458,7 @@ func (p *ConnPool) reaper(frequency time.Duration) {
|
||||
}
|
||||
_, err := p.ReapStaleConns()
|
||||
if err != nil {
|
||||
internal.Logger.Printf("ReapStaleConns failed: %s", err)
|
||||
internal.Logger.Printf(context.Background(), "ReapStaleConns failed: %s", err)
|
||||
continue
|
||||
}
|
||||
case <-p.closedCh:
|
||||
|
Reference in New Issue
Block a user