mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 09:52:20 +08:00
Remove Notice{,f} logging interface
And substitute the lines using Notice{,f} with Info{,f} License: MIT Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
@ -280,7 +280,7 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
|
||||
var keys []key.Key
|
||||
for _, block := range iblocks {
|
||||
if _, found := bs.wm.wl.Contains(block.Key()); !found {
|
||||
log.Notice("received un-asked-for block: %s", block)
|
||||
log.Info("received un-asked-for block: %s", block)
|
||||
continue
|
||||
}
|
||||
keys = append(keys, block.Key())
|
||||
@ -297,7 +297,7 @@ func (bs *Bitswap) ReceiveMessage(ctx context.Context, p peer.ID, incoming bsmsg
|
||||
has, err := bs.blockstore.Has(b.Key())
|
||||
if err != nil {
|
||||
bs.counterLk.Unlock()
|
||||
log.Noticef("blockstore.Has error: %s", err)
|
||||
log.Infof("blockstore.Has error: %s", err)
|
||||
return
|
||||
}
|
||||
if err == nil && has {
|
||||
|
@ -96,7 +96,7 @@ func (pm *WantManager) SendBlock(ctx context.Context, env *engine.Envelope) {
|
||||
log.Infof("Sending block %s to %s", env.Peer, env.Block)
|
||||
err := pm.network.SendMessage(ctx, env.Peer, msg)
|
||||
if err != nil {
|
||||
log.Noticef("sendblock error: %s", err)
|
||||
log.Infof("sendblock error: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ func (mq *msgQueue) doWork(ctx context.Context) {
|
||||
|
||||
err := mq.network.ConnectTo(conctx, mq.p)
|
||||
if err != nil {
|
||||
log.Noticef("cant connect to peer %s: %s", mq.p, err)
|
||||
log.Infof("cant connect to peer %s: %s", mq.p, err)
|
||||
// TODO: cant connect, what now?
|
||||
return
|
||||
}
|
||||
@ -174,7 +174,7 @@ func (mq *msgQueue) doWork(ctx context.Context) {
|
||||
// send wantlist updates
|
||||
err = mq.network.SendMessage(sendctx, mq.p, wlm)
|
||||
if err != nil {
|
||||
log.Noticef("bitswap send error: %s", err)
|
||||
log.Infof("bitswap send error: %s", err)
|
||||
// TODO: what do we do if this fails?
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user