Browse Source

dynamically change the log level for reading the disk status

pull/1507/head
Chris Lu 4 years ago
parent
commit
49d6dcfbc6
  1. 4
      weed/stats/disk.go

4
weed/stats/disk.go

@ -8,6 +8,8 @@ import (
func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) { func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) {
disk = &volume_server_pb.DiskStatus{Dir: path} disk = &volume_server_pb.DiskStatus{Dir: path}
fillInDiskStatus(disk) fillInDiskStatus(disk)
glog.V(2).Infof("read disk size: %v", disk)
if disk.PercentUsed > 95 {
glog.V(0).Infof("disk status: %v", disk)
}
return return
} }
Loading…
Cancel
Save