Skip to content

Commit

Permalink
unbound_exporter.go: Fixed startup message log output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jpds committed May 19, 2024
1 parent ab17c00 commit 437028e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions unbound_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/promlog"
"github.com/prometheus/common/version"
)

var (
Expand Down Expand Up @@ -548,7 +549,7 @@ func main() {
)
flag.Parse()

_ = level.Info(log).Log("Starting unbound_exporter")
_ = level.Info(log).Log("msg", "Starting unbound_exporter", "version", version.Info())
exporter, err := NewUnboundExporter(*unboundHost, *unboundCa, *unboundCert, *unboundKey)
if err != nil {
panic(err)
Expand All @@ -566,7 +567,7 @@ func main() {
</body>
</html>`))
})
_ = level.Info(log).Log("Listening on address:port => ", *listenAddress)
_ = level.Error(log).Log(http.ListenAndServe(*listenAddress, nil))
_ = level.Info(log).Log("msg", "Listening on address:port => ", *listenAddress)
_ = level.Error(log).Log("err", http.ListenAndServe(*listenAddress, nil))
os.Exit(1)
}

0 comments on commit 437028e

Please sign in to comment.