switch to go-kit/log (#1575)
Signed-off-by: yeya24 <yb532204897@gmail.com>
This commit is contained in:
parent
a80b7d0bc5
commit
2477c5c67d
158 changed files with 3434 additions and 4636 deletions
|
|
@ -25,6 +25,7 @@ import (
|
|||
"strconv"
|
||||
"unsafe"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
|
@ -49,7 +50,8 @@ import "C"
|
|||
const ClocksPerSec = float64(C.CLK_TCK)
|
||||
|
||||
type statCollector struct {
|
||||
cpu *prometheus.Desc
|
||||
cpu *prometheus.Desc
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -57,9 +59,10 @@ func init() {
|
|||
}
|
||||
|
||||
// NewCPUCollector returns a new Collector exposing CPU stats.
|
||||
func NewCPUCollector() (Collector, error) {
|
||||
func NewCPUCollector(logger log.Logger) (Collector, error) {
|
||||
return &statCollector{
|
||||
cpu: nodeCPUSecondsDesc,
|
||||
cpu: nodeCPUSecondsDesc,
|
||||
logger: logger,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue