From 49d6dcfbc61185c2a2669ad7f1f0ec0c99faf74a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 1 Aug 2020 11:15:52 -0700 Subject: [PATCH] dynamically change the log level for reading the disk status --- weed/stats/disk.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/stats/disk.go b/weed/stats/disk.go index 8af7240a8..a8f906213 100644 --- a/weed/stats/disk.go +++ b/weed/stats/disk.go @@ -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 }