Skip to content

Commit

Permalink
Merge pull request #10 from TheMeier/issues/8
Browse files Browse the repository at this point in the history
chore: update kitlog . Thanks a lot, Christoph!
  • Loading branch information
kic68 authored Nov 17, 2024
2 parents cdf0401 + 2e71126 commit 4cc119a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 272 deletions.
13 changes: 6 additions & 7 deletions downdetector-exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ import (

"github.com/goccy/go-yaml"

"github.com/go-kit/kit/log"
kitlog "github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/urfave/cli/v2"

"github.com/coreos/go-systemd/daemon"
Expand All @@ -34,7 +33,7 @@ const (
)

var (
lg = kitlog.NewLogfmtLogger(os.Stdout)
lg = log.NewLogfmtLogger(os.Stdout)

// fields for metrics request. If expanded, struct CompanySet needs to be expanded accordingly
fieldsToReturn = []string{"id", "name", "slug", "baseline_current", "country_iso", "stats_24", "stats_60", "status"}
Expand Down Expand Up @@ -177,7 +176,7 @@ func main() {
VERSION:
{{.Version}}
{{end}}
`
`

// TODO: - value checking
// app is a command line parser
Expand Down Expand Up @@ -272,8 +271,8 @@ func main() {
}

// Debugging output
lg = kitlog.NewLogfmtLogger(os.Stdout)
lg = kitlog.With(lg, "ts", log.DefaultTimestamp, "caller", kitlog.DefaultCaller)
lg = log.NewLogfmtLogger(os.Stdout)
lg = log.With(lg, "ts", log.DefaultTimestamp, "caller", log.DefaultCaller)
switch logLevel {
case "DEBUG":
lg = level.NewFilter(lg, level.AllowDebug())
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ go 1.16

require (
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/go-kit/kit v0.12.0
github.com/fatih/color v1.12.0 // indirect
github.com/go-kit/log v0.2.1
github.com/goccy/go-yaml v1.11.0
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/prometheus/client_golang v1.16.0
github.com/urfave/cli/v2 v2.25.7
)
Loading

0 comments on commit 4cc119a

Please sign in to comment.