Browse Source

adjust logging

pull/1189/head
Chris Lu 5 years ago
parent
commit
e6f9f5da3a
  1. 1
      weed/server/filer_grpc_server.go
  2. 4
      weed/server/volume_server_handlers_read.go

1
weed/server/filer_grpc_server.go

@ -20,6 +20,7 @@ func (fs *FilerServer) LookupDirectoryEntry(ctx context.Context, req *filer_pb.L
entry, err := fs.filer.FindEntry(ctx, filer2.FullPath(filepath.ToSlash(filepath.Join(req.Directory, req.Name)))) entry, err := fs.filer.FindEntry(ctx, filer2.FullPath(filepath.ToSlash(filepath.Join(req.Directory, req.Name))))
if err != nil { if err != nil {
glog.V(3).Infof("LookupDirectoryEntry %s: %+v, ", filepath.Join(req.Directory, req.Name), err)
return nil, err return nil, err
} }

4
weed/server/volume_server_handlers_read.go

@ -54,7 +54,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
return return
} }
glog.V(4).Infoln("volume", volumeId, "reading", n)
// glog.V(4).Infoln("volume", volumeId, "reading", n)
hasVolume := vs.store.HasVolume(volumeId) hasVolume := vs.store.HasVolume(volumeId)
_, hasEcVolume := vs.store.FindEcVolume(volumeId) _, hasEcVolume := vs.store.FindEcVolume(volumeId)
if !hasVolume && !hasEcVolume { if !hasVolume && !hasEcVolume {
@ -88,7 +88,7 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
} else if hasEcVolume { } else if hasEcVolume {
count, err = vs.store.ReadEcShardNeedle(context.Background(), volumeId, n) count, err = vs.store.ReadEcShardNeedle(context.Background(), volumeId, n)
} }
glog.V(4).Infoln("read bytes", count, "error", err)
// glog.V(4).Infoln("read bytes", count, "error", err)
if err != nil || count < 0 { if err != nil || count < 0 {
glog.V(0).Infof("read %s isNormalVolume %v error: %v", r.URL.Path, hasVolume, err) glog.V(0).Infof("read %s isNormalVolume %v error: %v", r.URL.Path, hasVolume, err)
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)

Loading…
Cancel
Save