From 935531e5d5cfd85a9c90ae7490cf6ffb3eeaeba5 Mon Sep 17 00:00:00 2001 From: Edgar Aroutiounian Date: Tue, 31 Mar 2020 09:53:15 -0700 Subject: [PATCH] [p2p] Remove incorrect logger usage (#2646) --- p2p/host/hostv2/hostv2.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/p2p/host/hostv2/hostv2.go b/p2p/host/hostv2/hostv2.go index 65507b4f2..0f151db86 100644 --- a/p2p/host/hostv2/hostv2.go +++ b/p2p/host/hostv2/hostv2.go @@ -213,7 +213,6 @@ func (host *HostV2) Peerstore() libp2p_peerstore.Peerstore { // New creates a host for p2p communication func New(self *p2p.Peer, priKey libp2p_crypto.PrivKey) (*HostV2, error) { // TODO: Convert to zerolog or internal logger interface - logger := utils.Logger() listenAddr, err := ma.NewMultiaddr(fmt.Sprintf("/ip4/0.0.0.0/tcp/%s", self.Port)) if err != nil { return nil, errors.Wrapf(err, @@ -243,7 +242,7 @@ func New(self *p2p.Peer, priKey libp2p_crypto.PrivKey) (*HostV2, error) { self.PeerID = p2pHost.ID() - subLogger := logger.With().Str("hostID", p2pHost.ID().Pretty()).Logger() + subLogger := utils.Logger().With().Str("hostID", p2pHost.ID().Pretty()).Logger() // has to save the private key for host h := &HostV2{ h: p2pHost,