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
|
|
@ -20,6 +20,7 @@ import (
|
|||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ type edacCollector struct {
|
|||
ueCount *prometheus.Desc
|
||||
csRowCECount *prometheus.Desc
|
||||
csRowUECount *prometheus.Desc
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -44,7 +46,7 @@ func init() {
|
|||
}
|
||||
|
||||
// NewEdacCollector returns a new Collector exposing edac stats.
|
||||
func NewEdacCollector() (Collector, error) {
|
||||
func NewEdacCollector(logger log.Logger) (Collector, error) {
|
||||
return &edacCollector{
|
||||
ceCount: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(namespace, edacSubsystem, "correctable_errors_total"),
|
||||
|
|
@ -66,6 +68,7 @@ func NewEdacCollector() (Collector, error) {
|
|||
"Total uncorrectable memory errors for this csrow.",
|
||||
[]string{"controller", "csrow"}, nil,
|
||||
),
|
||||
logger: logger,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue