Skip to content

Commit

Permalink
Fix promlog setup
Browse files Browse the repository at this point in the history
Use promlog correctly, makes nut_exporter not crash on startup.

Signed-off-by: SuperQ <superq@gmail.com>
  • Loading branch information
SuperQ committed Dec 28, 2021
1 parent 2c4b65d commit e5622f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nut_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"strings"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down Expand Up @@ -73,7 +72,7 @@ var (
)
var collectorOpts collectors.NutCollectorOpts

var logger log.Logger
var logger = promlog.New(&promlog.Config{})

func init() {
prometheus.MustRegister(version.NewCollector(*metricsNamespace))
Expand Down

0 comments on commit e5622f6

Please sign in to comment.