aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-11-16 22:26:58 -0800
committerChris Lu <chris.lu@gmail.com>2020-11-16 22:26:58 -0800
commit6c9156b25f8b1c28fb0cc909310a20aeeec0e087 (patch)
tree343e30d98e46a081aa57adfc334b807d0b3255dc /weed/stats/metrics.go
parent9add554feb53706d1d878cc9636d234e622b8a80 (diff)
downloadseaweedfs-6c9156b25f8b1c28fb0cc909310a20aeeec0e087.tar.xz
seaweedfs-6c9156b25f8b1c28fb0cc909310a20aeeec0e087.zip
switch to logrusorigin/logrus
losing filename and line number. Critical for debugging.
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go7
1 files changed, 3 insertions, 4 deletions
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