[p2p] Remove incorrect logger usage (#2646)

pull/2613/head
Edgar Aroutiounian 5 years ago committed by GitHub
parent 438f9bd639
commit 935531e5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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,

Loading…
Cancel
Save