Browse Source

less log

pull/279/head
tnextday 10 years ago
parent
commit
7573ba6db6
  1. 2
      weed/storage/disk_location.go
  2. 6
      weed/storage/volume.go

2
weed/storage/disk_location.go

@ -39,7 +39,7 @@ func (l *DiskLocation) LoadExistingVolumes(needleMapKind NeedleMapType) {
if !l.HasVolume(vid) { if !l.HasVolume(vid) {
if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil); e == nil { if v, e := NewVolume(l.Directory, collection, vid, needleMapKind, nil); e == nil {
l.AddVolume(vid, v) l.AddVolume(vid, v)
glog.V(0).Infof("data file %s, v=%d size=%d ttl=%s", l.Directory+"/"+name, v.Version(), v.Size(), v.Ttl.String())
glog.V(1).Infof("data file %s, v=%d size=%d ttl=%s", l.Directory+"/"+name, v.Version(), v.Size(), v.Ttl.String())
} else { } else {
glog.V(0).Infof("new volume %s error %s", name, e) glog.V(0).Infof("new volume %s error %s", name, e)
} }

6
weed/storage/volume.go

@ -111,17 +111,17 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
} }
switch needleMapKind { switch needleMapKind {
case NeedleMapInMemory: case NeedleMapInMemory:
glog.V(0).Infoln("loading index file", fileName+".idx", "readonly", v.readOnly)
glog.V(1).Infoln("loading index file", fileName+".idx", "readonly", v.readOnly)
if v.nm, e = LoadNeedleMap(indexFile); e != nil { if v.nm, e = LoadNeedleMap(indexFile); e != nil {
glog.V(0).Infof("loading index %s error: %v", fileName+".idx", e) glog.V(0).Infof("loading index %s error: %v", fileName+".idx", e)
} }
case NeedleMapLevelDb: case NeedleMapLevelDb:
glog.V(0).Infoln("loading leveldb file", fileName+".ldb")
glog.V(1).Infoln("loading leveldb file", fileName+".ldb")
if v.nm, e = NewLevelDbNeedleMap(fileName+".ldb", indexFile); e != nil { if v.nm, e = NewLevelDbNeedleMap(fileName+".ldb", indexFile); e != nil {
glog.V(0).Infof("loading leveldb %s error: %v", fileName+".ldb", e) glog.V(0).Infof("loading leveldb %s error: %v", fileName+".ldb", e)
} }
case NeedleMapBoltDb: case NeedleMapBoltDb:
glog.V(0).Infoln("loading boltdb file", fileName+".bdb")
glog.V(1).Infoln("loading boltdb file", fileName+".bdb")
if v.nm, e = NewBoltDbNeedleMap(fileName+".bdb", indexFile); e != nil { if v.nm, e = NewBoltDbNeedleMap(fileName+".bdb", indexFile); e != nil {
glog.V(0).Infof("loading boltdb %s error: %v", fileName+".bdb", e) glog.V(0).Infof("loading boltdb %s error: %v", fileName+".bdb", e)
} }

Loading…
Cancel
Save