Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to go-log@v2 #8765

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import (
cmdhttp "github.com/ipfs/go-ipfs-cmds/http"
config "github.com/ipfs/go-ipfs-config"
u "github.com/ipfs/go-ipfs-util"
logging "github.com/ipfs/go-log"
loggables "github.com/libp2p/go-libp2p-loggables"
logging "github.com/ipfs/go-log/v2"
ma "github.com/multiformats/go-multiaddr"
madns "github.com/multiformats/go-multiaddr-dns"
manet "github.com/multiformats/go-multiaddr/net"
Expand Down Expand Up @@ -73,7 +72,6 @@ func main() {

func mainRet() int {
rand.Seed(time.Now().UnixNano())
ctx := logging.ContextWithLoggable(context.Background(), loggables.Uuid("session"))
var err error

// we'll call this local helper to output errors.
Expand All @@ -89,7 +87,7 @@ func mainRet() int {
}
defer stopFunc() // to be executed as late as possible

intrh, ctx := util.SetupInterruptHandler(ctx)
intrh, ctx := util.SetupInterruptHandler(context.Background())
defer intrh.Close()

// Handle `ipfs version` or `ipfs help`
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/pinmfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
pinclient "github.com/ipfs/go-pinning-service-http-client"

config "github.com/ipfs/go-ipfs-config"
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/util/ulimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"
"syscall"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
)

var log = logging.Logger("ulimit")
Expand Down
2 changes: 1 addition & 1 deletion commands/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs-config"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
coreiface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
)
Expand Down
2 changes: 1 addition & 1 deletion core/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
"github.com/jbenet/goprocess"
"github.com/jbenet/goprocess/context"
"github.com/jbenet/goprocess/periodic"
Expand Down
2 changes: 1 addition & 1 deletion core/commands/cmdenv/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

cmds "github.com/ipfs/go-ipfs-cmds"
config "github.com/ipfs/go-ipfs-config"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
coreiface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
)
Expand Down
2 changes: 1 addition & 1 deletion core/commands/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
cmds "github.com/ipfs/go-ipfs-cmds"
offline "github.com/ipfs/go-ipfs-exchange-offline"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
dag "github.com/ipfs/go-merkledag"
mfs "github.com/ipfs/go-mfs"
ft "github.com/ipfs/go-unixfs"
Expand Down
32 changes: 23 additions & 9 deletions core/commands/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import (
"io"

cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
lwriter "github.com/ipfs/go-log/writer"
logging "github.com/ipfs/go-log/v2"
)

// Golang os.Args overrides * and replaces the character argument with
Expand Down Expand Up @@ -104,22 +103,37 @@ subsystems of a running daemon.
Type: stringList{},
}

const logLevelOption = "log-level"

var logTailCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Read the event log.",
ShortDescription: `
Outputs event log messages (not other log messages) as they are generated.
`,
},

Options: []cmds.Option{
// FIXME: The PipeReader doesn't support per-subsystem log levels like
// https://github.com/ipfs/go-log#golog_log_level, just a global one.
cmds.StringOption(logLevelOption, "Log level to listen to.").WithDefault(""),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
ctx := req.Context
r, w := io.Pipe()
var pipeReader *logging.PipeReader
logLevelString, _ := req.Options[logLevelOption].(string)
if logLevelString != "" {
logLevel, err := logging.LevelFromString(logLevelString)
if err != nil {
return fmt.Errorf("setting log level %s: %w", logLevelString, err)
}
pipeReader = logging.NewPipeReader(logging.PipeLevel(logLevel))
} else {
pipeReader = logging.NewPipeReader()
}

go func() {
defer w.Close()
<-ctx.Done()
defer pipeReader.Close()
<-req.Context.Done()
}()
lwriter.WriterGroup.AddWriter(w)
return res.Emit(r)
return res.Emit(pipeReader)
},
}
2 changes: 1 addition & 1 deletion core/commands/name/ipns.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
namesys "github.com/ipfs/go-namesys"

cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
path "github.com/ipfs/go-path"
options "github.com/ipfs/interface-go-ipfs-core/options"
nsopts "github.com/ipfs/interface-go-ipfs-core/options/namesys"
Expand Down
2 changes: 1 addition & 1 deletion core/commands/pin/remotepin.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
config "github.com/ipfs/go-ipfs-config"
"github.com/ipfs/go-ipfs/core/commands/cmdenv"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
pinclient "github.com/ipfs/go-pinning-service-http-client"
path "github.com/ipfs/interface-go-ipfs-core/path"
"github.com/libp2p/go-libp2p-core/host"
Expand Down
2 changes: 1 addition & 1 deletion core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
unixfs "github.com/ipfs/go-ipfs/core/commands/unixfs"

cmds "github.com/ipfs/go-ipfs-cmds"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
)

var log = logging.Logger("core/commands")
Expand Down
2 changes: 1 addition & 1 deletion core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
exchange "github.com/ipfs/go-ipfs-exchange-interface"
"github.com/ipfs/go-ipfs-provider"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
mfs "github.com/ipfs/go-mfs"
goprocess "github.com/jbenet/goprocess"
connmgr "github.com/libp2p/go-libp2p-core/connmgr"
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/corehttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

core "github.com/ipfs/go-ipfs/core"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
"github.com/jbenet/goprocess"
periodicproc "github.com/jbenet/goprocess/periodic"
ma "github.com/multiformats/go-multiaddr"
Expand Down
32 changes: 29 additions & 3 deletions core/corehttp/logs.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package corehttp

import (
"bytes"
"io"
"net"
"net/http"

core "github.com/ipfs/go-ipfs/core"
lwriter "github.com/ipfs/go-log/writer"

logging "github.com/ipfs/go-log/v2"
)

type writeErrNotifier struct {
Expand Down Expand Up @@ -49,8 +51,32 @@ func LogOption() ServeOption {
mux.HandleFunc("/logs", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(200)
wnf, errs := newWriteErrNotifier(w)
lwriter.WriterGroup.AddWriter(wnf)
log.Event(n.Context(), "log API client connected") //nolint deprecated

// FIXME(BLOCKING): This is a brittle solution and needs careful review.
Copy link
Contributor

@Jorropo Jorropo Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code is running in circles doing useless things:

https://github.com/ipfs/go-log/blob/8625e3ec81bdeb96627de192e6fe21eab5896603/pipe.go#L50-L58

	r, w := io.Pipe()

  p := &PipeReader{
  	r:      r,
  	closer: w,
  	core:   newCore(opt.format, zapcore.AddSync(w), opt.level),
  }

Zap wants to write to an io.Writer and we have an io.Writer but we are doing zap -(Write)> io.Pipe -(Read)> Read Write Repeat Loop -(Write)> HTTP Writer.

You should add support in go-log@v2 to add a writer into the core pool.
The only issue I see with that is that the syncronous nature of it could make scalling really slow (as it would write logs synchronously one by one).
And someone could do a slow loris attack and stuck the IPFS node.

The first approach we can say is it's the API and if you are so slow that you manage to slow your IPFS node it's your fault. With API access you could nuke the config anyway and we can't be expected to protect people from themselves.

If that really an issue we could implement a simple asynchronous buffered IO wrapper, that would cut off if there is too many buffered data.
Would be easy to do with channels (have write append to a channel and a goroutine read from that channel and forward the data to Write, you could also implement a custom ring buffer to coalles multiple reads). And since you are using channels in the copy loop, you can select on both the data input and the context done.

zap -(Write)> asyncBuffer -(sendDataOverChannelWithSelectOverAContextToo)> copyLoop -(Write)> HTTP

If I was unclear just ask and I'll write that part, I already know what to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an issue that should be raised and addressed in go-log, not here. I agree that things should be better on that side.

// Ideally we should use an io.Pipe or similar, but in contrast
// with go-log@v1 where the driver was an io.Writer, here the log
// comes from an io.Reader, and we need to constantly read from it
// and then write to the HTTP response.
pipeReader := logging.NewPipeReader()
b := new(bytes.Buffer)
go func() {
for {
// FIXME: We are not handling read errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error seems handling seems easy enough.

An error while reading should be sent to the client and terminate the connection.
And an error while writing probably means the client disconnected, so just terminate the connection.

// FIXME: We may block on read and not catch the context
// cancellation.
b.ReadFrom(pipeReader)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a potential unbounded memory growth.

If we implement things like that we should use Read, Write loop with a fixed size buffer.

b.WriteTo(wnf)
select {
case <-r.Context().Done():
return
default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That code is a potential CPU spinner if you have a non blocking reader being returned. (which currently is not the case, currently this is an io.Pipe which blocks if there is no data).

Just one more reason to make the correct thing (either just enroll it in the log framework, or make a custom asynchronous buffering thing and enroll that).

}
}
}()
Comment on lines +55 to +75
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: need help.


// FIXME(BLOCKING): Verify this call replacing the `Event` API
// which has been removed in go-log v2.
log.Debugf("log API client connected")
Comment on lines +77 to +79
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: need help.

<-errs
})
return mux, nil
Expand Down
2 changes: 1 addition & 1 deletion core/corerepo/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/dustin/go-humanize"
"github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
"github.com/ipfs/go-mfs"
)

Expand Down
2 changes: 1 addition & 1 deletion core/coreunix/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
pin "github.com/ipfs/go-ipfs-pinner"
posinfo "github.com/ipfs/go-ipfs-posinfo"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
dag "github.com/ipfs/go-merkledag"
"github.com/ipfs/go-mfs"
"github.com/ipfs/go-unixfs"
Expand Down
2 changes: 1 addition & 1 deletion core/node/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
blockstore "github.com/ipfs/go-ipfs-blockstore"
config "github.com/ipfs/go-ipfs-config"
util "github.com/ipfs/go-ipfs-util"
"github.com/ipfs/go-log"
"github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"

Expand Down
2 changes: 1 addition & 1 deletion core/node/libp2p/libp2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
version "github.com/ipfs/go-ipfs"
config "github.com/ipfs/go-ipfs-config"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
"github.com/libp2p/go-libp2p"
connmgr "github.com/libp2p/go-libp2p-connmgr"
"github.com/libp2p/go-libp2p-core/crypto"
Expand Down
2 changes: 1 addition & 1 deletion fuse/ipns/ipns_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
fuse "bazil.org/fuse"
fs "bazil.org/fuse/fs"
cid "github.com/ipfs/go-cid"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
mfs "github.com/ipfs/go-mfs"
iface "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
Expand Down
2 changes: 1 addition & 1 deletion fuse/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"runtime"
"time"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
goprocess "github.com/jbenet/goprocess"
)

Expand Down
2 changes: 1 addition & 1 deletion fuse/node/mount_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
mount "github.com/ipfs/go-ipfs/fuse/mount"
rofs "github.com/ipfs/go-ipfs/fuse/readonly"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
)

var log = logging.Logger("node")
Expand Down
2 changes: 1 addition & 1 deletion fuse/readonly/readonly_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/ipfs/go-cid"
core "github.com/ipfs/go-ipfs/core"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
mdag "github.com/ipfs/go-merkledag"
path "github.com/ipfs/go-path"
"github.com/ipfs/go-path/resolver"
Expand Down
2 changes: 1 addition & 1 deletion gc/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
offline "github.com/ipfs/go-ipfs-exchange-offline"
pin "github.com/ipfs/go-ipfs-pinner"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
dag "github.com/ipfs/go-merkledag"
"github.com/ipfs/go-verifcid"
)
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/ipfs/go-ipld-git v0.1.1
github.com/ipfs/go-ipld-legacy v0.1.0
github.com/ipfs/go-ipns v0.1.2
github.com/ipfs/go-log v1.0.5
github.com/ipfs/go-log/v2 v2.5.0
github.com/ipfs/go-merkledag v0.5.1
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-metrics-prometheus v0.0.2
Expand All @@ -73,7 +73,6 @@ require (
github.com/libp2p/go-libp2p-http v0.2.1
github.com/libp2p/go-libp2p-kad-dht v0.15.0
github.com/libp2p/go-libp2p-kbucket v0.4.7
github.com/libp2p/go-libp2p-loggables v0.1.0
github.com/libp2p/go-libp2p-mplex v0.4.1
github.com/libp2p/go-libp2p-noise v0.3.0
github.com/libp2p/go-libp2p-peerstore v0.4.0
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,9 @@ github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBW
github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw=
github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM=
github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g=
github.com/ipfs/go-log/v2 v2.3.0 h1:31Re/cPqFHpsRHgyVwjWADPoF0otB1WrjTy8ZFYwEZU=
github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g=
github.com/ipfs/go-log/v2 v2.5.0 h1:+MhAooFd9XZNvR0i9FriKW6HB0ql7HNXUuflWtc0dd4=
github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto=
github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M=
Expand Down Expand Up @@ -1033,8 +1034,9 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
Expand Down Expand Up @@ -1426,6 +1428,7 @@ go.uber.org/fx v1.16.0 h1:N8i80+X1DCX+qMRiKzM+jPPZiIiyK/bVCysga3+B+1w=
go.uber.org/fx v1.16.0/go.mod h1:OMoT5BnXcOaiexlpjtpE4vcAmzyDKyRs9TRYXCzamx8=
go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
Expand All @@ -1442,6 +1445,7 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
Expand Down
2 changes: 1 addition & 1 deletion p2p/p2p.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package p2p

import (
logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
p2phost "github.com/libp2p/go-libp2p-core/host"
peer "github.com/libp2p/go-libp2p-core/peer"
pstore "github.com/libp2p/go-libp2p-core/peerstore"
Expand Down
2 changes: 1 addition & 1 deletion peering/peering.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/ipfs/go-log"
"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"
Expand Down
2 changes: 1 addition & 1 deletion plugin/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
plugin "github.com/ipfs/go-ipfs/plugin"
fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"

logging "github.com/ipfs/go-log"
logging "github.com/ipfs/go-log/v2"
opentracing "github.com/opentracing/opentracing-go"
)

Expand Down
Loading