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

@ -19,6 +19,7 @@ package collector
import (
"fmt"
"github.com/go-kit/kit/log"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
@ -54,6 +55,7 @@ type timexCollector struct {
stbcnt,
tai,
syncStatus typedDesc
logger log.Logger
}
func init() {
@ -61,7 +63,7 @@ func init() {
}
// NewTimexCollector returns a new Collector exposing adjtime(3) stats.
func NewTimexCollector() (Collector, error) {
func NewTimexCollector(logger log.Logger) (Collector, error) {
const subsystem = "timex"
return &timexCollector{
@ -150,6 +152,7 @@ func NewTimexCollector() (Collector, error) {
"Is clock synchronized to a reliable server (1 = yes, 0 = no).",
nil, nil,
), prometheus.GaugeValue},
logger: logger,
}, nil
}