dynamically change the log level for reading the disk status

This commit is contained in:
Chris Lu 2020-08-01 11:15:52 -07:00
parent 90ddd7ec92
commit 49d6dcfbc6

View file

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