Skip to content

Commit 34bb142

Browse files
authored
Migrating from go-kit/kit/log to the slimmer go-kit/log (#4421)
* Migrating from go-kit/kit/log to the slimmer go-kit/log Signed-off-by: Danny Kopping <[email protected]> * Appeasing the linter Signed-off-by: Danny Kopping <[email protected]> * Fixing tests where log lines are produced with different label orders Signed-off-by: Danny Kopping <[email protected]>
1 parent 3291733 commit 34bb142

File tree

255 files changed

+391
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+391
-367
lines changed

.errcheck-exclude

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
io/ioutil.WriteFile
22
io/ioutil.ReadFile
3-
(github.com/go-kit/kit/log.Logger).Log
3+
(github.com/go-kit/log.Logger).Log
44
io.Copy
55
(github.com/opentracing/opentracing-go.Tracer).Inject
66
(*github.com/cortexproject/cortex/pkg/util/spanlogger.SpanLogger).Error

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ linters:
77
- golint
88
- gofmt
99
- misspell
10+
- depguard
1011

1112
linters-settings:
1213
errcheck:
@@ -16,6 +17,12 @@ linters-settings:
1617
goimports:
1718
local-prefixes: "github.com/cortexproject/cortex"
1819

20+
depguard:
21+
list-type: blacklist
22+
include-go-root: true
23+
packages-with-error-message:
24+
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
25+
1926
run:
2027
timeout: 5m
2128

cmd/blocksconvert/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/go-kit/kit/log/level"
10+
"github.com/go-kit/log/level"
1111
"github.com/grafana/dskit/services"
1212
"github.com/prometheus/client_golang/prometheus"
1313
"github.com/weaveworks/common/server"

cmd/cortex/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313
"time"
1414

15-
"github.com/go-kit/kit/log/level"
15+
"github.com/go-kit/log/level"
1616
"github.com/grafana/dskit/flagext"
1717
"github.com/pkg/errors"
1818
"github.com/prometheus/client_golang/prometheus"

cmd/query-tee/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"flag"
55
"os"
66

7-
"github.com/go-kit/kit/log/level"
7+
"github.com/go-kit/log/level"
88
"github.com/prometheus/client_golang/prometheus"
99
"github.com/prometheus/client_golang/prometheus/collectors"
1010
"github.com/weaveworks/common/logging"

cmd/test-exporter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"math"
66
"time"
77

8-
"github.com/go-kit/kit/log/level"
8+
"github.com/go-kit/log/level"
99
"github.com/grafana/dskit/flagext"
1010
"github.com/prometheus/client_golang/prometheus"
1111
"github.com/weaveworks/common/server"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb
1919
github.com/felixge/fgprof v0.9.1
2020
github.com/fsouza/fake-gcs-server v1.7.0
21-
github.com/go-kit/kit v0.11.0
21+
github.com/go-kit/log v0.1.0
2222
github.com/go-openapi/strfmt v0.20.1
2323
github.com/go-openapi/swag v0.19.15
2424
github.com/go-redis/redis/v8 v8.9.0

integration/e2e/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88
"time"
99

10-
"github.com/go-kit/kit/log"
10+
"github.com/go-kit/log"
1111
)
1212

1313
// Global logger to use in integration tests. We use a global logger to simplify

integration/e2e/scenario_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010
"time"
1111

12-
"github.com/go-kit/kit/log"
12+
"github.com/go-kit/log"
1313
"github.com/stretchr/testify/assert"
1414
"github.com/stretchr/testify/require"
1515
"github.com/thanos-io/thanos/pkg/objstore/s3"

integration/e2e/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313
"time"
1414

15-
"github.com/go-kit/kit/log"
15+
"github.com/go-kit/log"
1616
"github.com/grafana/dskit/backoff"
1717
"github.com/pkg/errors"
1818
"github.com/prometheus/common/expfmt"

0 commit comments

Comments
 (0)