aboutsummaryrefslogtreecommitdiff
path: root/weed/stats
diff options
context:
space:
mode:
Diffstat (limited to 'weed/stats')
-rw-r--r--weed/stats/disk.go4
-rw-r--r--weed/stats/metrics.go7
2 files changed, 5 insertions, 6 deletions
diff --git a/weed/stats/disk.go b/weed/stats/disk.go
index a8f906213..4c0512f80 100644
--- a/weed/stats/disk.go
+++ b/weed/stats/disk.go
@@ -1,7 +1,7 @@
package stats
import (
- "github.com/chrislusf/seaweedfs/weed/glog"
+ "github.com/chrislusf/seaweedfs/weed/util/log"
"github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
)
@@ -9,7 +9,7 @@ func NewDiskStatus(path string) (disk *volume_server_pb.DiskStatus) {
disk = &volume_server_pb.DiskStatus{Dir: path}
fillInDiskStatus(disk)
if disk.PercentUsed > 95 {
- glog.V(0).Infof("disk status: %v", disk)
+ log.Infof("disk status: %v", disk)
}
return
}
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 3f5d851a4..78aad4990 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -2,7 +2,6 @@ package stats
import (
"fmt"
- "log"
"net/http"
"os"
"strings"
@@ -12,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/client_golang/prometheus/push"
- "github.com/chrislusf/seaweedfs/weed/glog"
+ "github.com/chrislusf/seaweedfs/weed/util/log"
)
var (
@@ -152,14 +151,14 @@ func LoopPushingMetric(name, instance, addr string, intervalSeconds int) {
return
}
- glog.V(0).Infof("%s server sends metrics to %s every %d seconds", name, addr, intervalSeconds)
+ log.Infof("%s server sends metrics to %s every %d seconds", name, addr, intervalSeconds)
pusher := push.New(addr, name).Gatherer(Gather).Grouping("instance", instance)
for {
err := pusher.Push()
if err != nil && !strings.HasPrefix(err.Error(), "unexpected status code 200") {
- glog.V(0).Infof("could not push metrics to prometheus push gateway %s: %v", addr, err)
+ log.Infof("could not push metrics to prometheus push gateway %s: %v", addr, err)
}
if intervalSeconds <= 0 {
intervalSeconds = 15