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
|
|
@ -16,12 +16,14 @@
|
|||
package collector
|
||||
|
||||
import (
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
type conntrackCollector struct {
|
||||
current *prometheus.Desc
|
||||
limit *prometheus.Desc
|
||||
logger log.Logger
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -29,7 +31,7 @@ func init() {
|
|||
}
|
||||
|
||||
// NewConntrackCollector returns a new Collector exposing conntrack stats.
|
||||
func NewConntrackCollector() (Collector, error) {
|
||||
func NewConntrackCollector(logger log.Logger) (Collector, error) {
|
||||
return &conntrackCollector{
|
||||
current: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(namespace, "", "nf_conntrack_entries"),
|
||||
|
|
@ -41,6 +43,7 @@ func NewConntrackCollector() (Collector, error) {
|
|||
"Maximum size of connection tracking table.",
|
||||
nil, nil,
|
||||
),
|
||||
logger: logger,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue