From 2ad02f79b2af35cd6107db39292bd1ab5af798ec Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 29 Apr 2021 14:15:17 -0700 Subject: [PATCH] chore: update to go-log v2 --- config/config.go | 2 +- go.mod | 2 +- go.sum | 3 +-- p2p/discovery/mdns.go | 2 +- p2p/host/basic/basic_host.go | 2 +- p2p/host/relay/log.go | 2 +- p2p/host/routed/routed.go | 2 +- p2p/net/conngater/conngater.go | 2 +- p2p/net/mock/mock.go | 2 +- p2p/protocol/identify/id.go | 2 +- p2p/protocol/ping/ping.go | 2 +- p2p/test/backpressure/backpressure_test.go | 2 +- p2p/test/reconnects/reconnect_test.go | 2 +- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/config/config.go b/config/config.go index f3310dc6ea..bce0f300aa 100644 --- a/config/config.go +++ b/config/config.go @@ -29,7 +29,7 @@ import ( swarm "github.com/libp2p/go-libp2p-swarm" tptu "github.com/libp2p/go-libp2p-transport-upgrader" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ma "github.com/multiformats/go-multiaddr" madns "github.com/multiformats/go-multiaddr-dns" ) diff --git a/go.mod b/go.mod index ebb21a176b..a350f3598e 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/ipfs/go-datastore v0.4.5 github.com/ipfs/go-detect-race v0.0.1 github.com/ipfs/go-ipfs-util v0.0.2 - github.com/ipfs/go-log v1.0.5 + github.com/ipfs/go-log/v2 v2.1.3 github.com/jbenet/go-cienv v0.1.0 github.com/jbenet/goprocess v0.1.4 github.com/libp2p/go-addr-util v0.0.2 diff --git a/go.sum b/go.sum index 73e2046d60..3b9cf3e678 100644 --- a/go.sum +++ b/go.sum @@ -182,9 +182,8 @@ github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdr github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= +github.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY= github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= -github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= diff --git a/p2p/discovery/mdns.go b/p2p/discovery/mdns.go index d0267e41d6..d78ace24bf 100644 --- a/p2p/discovery/mdns.go +++ b/p2p/discovery/mdns.go @@ -11,7 +11,7 @@ import ( "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/peer" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ma "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" "github.com/whyrusleeping/mdns" diff --git a/p2p/host/basic/basic_host.go b/p2p/host/basic/basic_host.go index 6a7f02e6a3..aac8e46b1b 100644 --- a/p2p/host/basic/basic_host.go +++ b/p2p/host/basic/basic_host.go @@ -27,7 +27,7 @@ import ( "github.com/libp2p/go-libp2p/p2p/protocol/ping" "github.com/libp2p/go-netroute" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ma "github.com/multiformats/go-multiaddr" madns "github.com/multiformats/go-multiaddr-dns" diff --git a/p2p/host/relay/log.go b/p2p/host/relay/log.go index eca0fa45a8..975949a48d 100644 --- a/p2p/host/relay/log.go +++ b/p2p/host/relay/log.go @@ -1,7 +1,7 @@ package relay import ( - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ) var log = logging.Logger("autorelay") diff --git a/p2p/host/routed/routed.go b/p2p/host/routed/routed.go index 0c8c3e4872..ba9450e1c3 100644 --- a/p2p/host/routed/routed.go +++ b/p2p/host/routed/routed.go @@ -13,7 +13,7 @@ import ( "github.com/libp2p/go-libp2p-core/peerstore" "github.com/libp2p/go-libp2p-core/protocol" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ma "github.com/multiformats/go-multiaddr" ) diff --git a/p2p/net/conngater/conngater.go b/p2p/net/conngater/conngater.go index 51993f4f13..4fa8dde886 100644 --- a/p2p/net/conngater/conngater.go +++ b/p2p/net/conngater/conngater.go @@ -15,7 +15,7 @@ import ( "github.com/ipfs/go-datastore" "github.com/ipfs/go-datastore/namespace" "github.com/ipfs/go-datastore/query" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ) // BasicConnectionGater implements a connection gater that allows the application to perform diff --git a/p2p/net/mock/mock.go b/p2p/net/mock/mock.go index 55256f867f..3dc840329d 100644 --- a/p2p/net/mock/mock.go +++ b/p2p/net/mock/mock.go @@ -3,7 +3,7 @@ package mocknet import ( "context" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ) var log = logging.Logger("mocknet") diff --git a/p2p/protocol/identify/id.go b/p2p/protocol/identify/id.go index d09d650173..e2995c23a8 100644 --- a/p2p/protocol/identify/id.go +++ b/p2p/protocol/identify/id.go @@ -26,7 +26,7 @@ import ( msmux "github.com/multiformats/go-multistream" "github.com/gogo/protobuf/proto" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" ) var log = logging.Logger("net/identify") diff --git a/p2p/protocol/ping/ping.go b/p2p/protocol/ping/ping.go index ae04846830..b1f3da4efe 100644 --- a/p2p/protocol/ping/ping.go +++ b/p2p/protocol/ping/ping.go @@ -8,7 +8,7 @@ import ( "time" u "github.com/ipfs/go-ipfs-util" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" diff --git a/p2p/test/backpressure/backpressure_test.go b/p2p/test/backpressure/backpressure_test.go index 72525b53f8..99a7d2e271 100644 --- a/p2p/test/backpressure/backpressure_test.go +++ b/p2p/test/backpressure/backpressure_test.go @@ -10,7 +10,7 @@ import ( bhost "github.com/libp2p/go-libp2p/p2p/host/basic" u "github.com/ipfs/go-ipfs-util" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" diff --git a/p2p/test/reconnects/reconnect_test.go b/p2p/test/reconnects/reconnect_test.go index e1d969ffaa..9ec16ba43d 100644 --- a/p2p/test/reconnects/reconnect_test.go +++ b/p2p/test/reconnects/reconnect_test.go @@ -11,7 +11,7 @@ import ( bhost "github.com/libp2p/go-libp2p/p2p/host/basic" u "github.com/ipfs/go-ipfs-util" - logging "github.com/ipfs/go-log" + logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" protocol "github.com/libp2p/go-libp2p-core/protocol"