TUN-4974: Fix regression where we were debug logging by accident

This commit is contained in:
Nuno Diegues 2021-08-26 09:34:56 +01:00
parent 4ff215ee8c
commit 836149a5b0
1 changed files with 2 additions and 2 deletions

View File

@ -5,13 +5,11 @@ import (
"sync" "sync"
"github.com/rs/zerolog" "github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/cloudflare/cloudflared/edgediscovery/allregions" "github.com/cloudflare/cloudflared/edgediscovery/allregions"
) )
const ( const (
LogFieldAddress = "address"
LogFieldConnIndex = "connIndex" LogFieldConnIndex = "connIndex"
) )
@ -101,6 +99,8 @@ func (ed *Edge) GetAddr(connIndex int) (*allregions.EdgeAddr, error) {
// GetDifferentAddr gives back the proxy connection's edge Addr and uses a new one. // GetDifferentAddr gives back the proxy connection's edge Addr and uses a new one.
func (ed *Edge) GetDifferentAddr(connIndex int) (*allregions.EdgeAddr, error) { func (ed *Edge) GetDifferentAddr(connIndex int) (*allregions.EdgeAddr, error) {
log := ed.log.With().Int(LogFieldConnIndex, connIndex).Logger()
ed.Lock() ed.Lock()
defer ed.Unlock() defer ed.Unlock()