switch to go-kit/log (#1575)

Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
Ben Ye 2019-12-31 11:19:37 -05:00 committed by Ben Kochie
commit 2477c5c67d
158 changed files with 3434 additions and 4636 deletions

View file

@ -22,6 +22,7 @@ import (
"os"
"strconv"
"github.com/go-kit/kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -29,15 +30,17 @@ const (
fileFDStatSubsystem = "filefd"
)
type fileFDStatCollector struct{}
type fileFDStatCollector struct {
logger log.Logger
}
func init() {
registerCollector(fileFDStatSubsystem, defaultEnabled, NewFileFDStatCollector)
}
// NewFileFDStatCollector returns a new Collector exposing file-nr stats.
func NewFileFDStatCollector() (Collector, error) {
return &fileFDStatCollector{}, nil
func NewFileFDStatCollector(logger log.Logger) (Collector, error) {
return &fileFDStatCollector{logger}, nil
}
func (c *fileFDStatCollector) Update(ch chan<- prometheus.Metric) error {