aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/storage/netstore.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-22 20:10:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-02-23 18:16:44 +0800
commitd4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851 (patch)
tree17c93170551d3eeabe2935de1765f157007f0dc2 /swarm/storage/netstore.go
parent47af53f9aaf9aa7b12cd976eb150ccf3d64da6fd (diff)
downloaddexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.gz
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.tar.zst
dexon-d4fd06c3dc6cd6d2dbd2bfebfee5bcb46a504851.zip
all: blidly swap out glog to our log15, logs need rework
Diffstat (limited to 'swarm/storage/netstore.go')
-rw-r--r--swarm/storage/netstore.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go
index 46479b58a..7c0436c3f 100644
--- a/swarm/storage/netstore.go
+++ b/swarm/storage/netstore.go
@@ -17,12 +17,12 @@
package storage
import (
+ "fmt"
"path/filepath"
"sync"
"time"
- "github.com/ethereum/go-ethereum/logger"
- "github.com/ethereum/go-ethereum/logger/glog"
+ "github.com/ethereum/go-ethereum/log"
)
/*
@@ -98,14 +98,14 @@ func (self *NetStore) Put(entry *Chunk) {
// handle deliveries
if entry.Req != nil {
- glog.V(logger.Detail).Infof("NetStore.Put: localStore.Put %v hit existing request...delivering", entry.Key.Log())
+ log.Trace(fmt.Sprintf("NetStore.Put: localStore.Put %v hit existing request...delivering", entry.Key.Log()))
// closing C signals to other routines (local requests)
// that the chunk is has been retrieved
close(entry.Req.C)
// deliver the chunk to requesters upstream
go self.cloud.Deliver(entry)
} else {
- glog.V(logger.Detail).Infof("NetStore.Put: localStore.Put %v stored locally", entry.Key.Log())
+ log.Trace(fmt.Sprintf("NetStore.Put: localStore.Put %v stored locally", entry.Key.Log()))
// handle propagating store requests
// go self.cloud.Store(entry)
go self.cloud.Store(entry)
@@ -118,15 +118,15 @@ func (self *NetStore) Get(key Key) (*Chunk, error) {
chunk, err := self.localStore.Get(key)
if err == nil {
if chunk.Req == nil {
- glog.V(logger.Detail).Infof("NetStore.Get: %v found locally", key)
+ log.Trace(fmt.Sprintf("NetStore.Get: %v found locally", key))
} else {
- glog.V(logger.Detail).Infof("NetStore.Get: %v hit on an existing request", key)
+ log.Trace(fmt.Sprintf("NetStore.Get: %v hit on an existing request", key))
// no need to launch again
}
return chunk, err
}
// no data and no request status
- glog.V(logger.Detail).Infof("NetStore.Get: %v not found locally. open new request", key)
+ log.Trace(fmt.Sprintf("NetStore.Get: %v not found locally. open new request", key))
chunk = NewChunk(key, newRequestStatus(key))
self.localStore.memStore.Put(chunk)
go self.cloud.Retrieve(chunk)