diff --git a/.errcheck-exclude b/.errcheck-exclude index ae1d5a24b..4b2090a39 100644 --- a/.errcheck-exclude +++ b/.errcheck-exclude @@ -1,5 +1,5 @@ io/ioutil.WriteFile io/ioutil.ReadFile -(github.com/go-kit/kit/log.Logger).Log +(github.com/go-kit/log.Logger).Log io.Copy (github.com/opentracing/opentracing-go.Tracer).Inject diff --git a/CHANGELOG.md b/CHANGELOG.md index ee265c18d..1250ce6f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,4 +10,5 @@ * [ENHANCEMENT] Add middleware package. #38 * [ENHANCEMENT] Add the ring package #45 * [ENHANCEMENT] Add limiter package. #41 -* [ENHANCEMENT] Add grpcclient, grpcencoding and grpcutil packages. #39 \ No newline at end of file +* [ENHANCEMENT] Add grpcclient, grpcencoding and grpcutil packages. #39 +* [ENHANCEMENT] Replace go-kit/kit/log with go-kit/log. #52 diff --git a/Makefile b/Makefile index 8834b335c..7535d82dc 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ lint: .tools/bin/misspell .tools/bin/faillint .tools/bin/golangci-lint faillint -paths "github.com/bmizerany/assert=github.com/stretchr/testify/assert,\ golang.org/x/net/context=context,\ sync/atomic=go.uber.org/atomic,\ + github.com/go-kit/kit/log, \ github.com/prometheus/client_golang/prometheus.{MustRegister}=github.com/prometheus/client_golang/prometheus/promauto,\ github.com/prometheus/client_golang/prometheus.{NewCounter,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,NewHistogram,NewHistogramVec,NewSummary,NewSummaryVec}\ =github.com/prometheus/client_golang/prometheus/promauto.With.{NewCounter,NewCounterVec,NewGauge,NewGaugeVec,NewGaugeFunc,NewHistogram,NewHistogramVec,NewSummary,NewSummaryVec}"\ diff --git a/flagext/deprecated.go b/flagext/deprecated.go index 0a6913ab6..188be2b04 100644 --- a/flagext/deprecated.go +++ b/flagext/deprecated.go @@ -3,8 +3,8 @@ package flagext import ( "flag" - "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/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" ) diff --git a/go.mod b/go.mod index 4ad5dc184..29381a69e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.16 require ( github.com/armon/go-metrics v0.3.0 github.com/coreos/etcd v3.3.25+incompatible // indirect - github.com/go-kit/kit v0.10.0 + github.com/go-kit/log v0.1.0 github.com/gogo/protobuf v1.3.2 github.com/gogo/status v1.1.0 github.com/golang/snappy v0.0.4 diff --git a/go.sum b/go.sum index 56c23c16a..fc26ebd43 100644 --- a/go.sum +++ b/go.sum @@ -90,6 +90,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= diff --git a/grpcclient/grpcclient.go b/grpcclient/grpcclient.go index 6114d15d8..094337f5d 100644 --- a/grpcclient/grpcclient.go +++ b/grpcclient/grpcclient.go @@ -4,7 +4,7 @@ import ( "flag" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" middleware "github.com/grpc-ecosystem/go-grpc-middleware" "github.com/pkg/errors" "google.golang.org/grpc" diff --git a/grpcutil/dns_resolver.go b/grpcutil/dns_resolver.go index ae5dc5cb4..ad9f17c78 100644 --- a/grpcutil/dns_resolver.go +++ b/grpcutil/dns_resolver.go @@ -10,8 +10,8 @@ import ( "strconv" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) const ( diff --git a/kv/client.go b/kv/client.go index 3a8f410b8..b73620dfd 100644 --- a/kv/client.go +++ b/kv/client.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/grafana/dskit/kv/codec" diff --git a/kv/consul/client.go b/kv/consul/client.go index 9ce6d91c5..b3391c9cd 100644 --- a/kv/consul/client.go +++ b/kv/consul/client.go @@ -9,8 +9,8 @@ import ( "net/http" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" consul "github.com/hashicorp/consul/api" "github.com/hashicorp/go-cleanhttp" "github.com/prometheus/client_golang/prometheus" diff --git a/kv/consul/mock.go b/kv/consul/mock.go index a5ed43df9..ae9c768f9 100644 --- a/kv/consul/mock.go +++ b/kv/consul/mock.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" consul "github.com/hashicorp/consul/api" "github.com/prometheus/client_golang/prometheus" diff --git a/kv/etcd/etcd.go b/kv/etcd/etcd.go index e72922ea3..b08fb6a9d 100644 --- a/kv/etcd/etcd.go +++ b/kv/etcd/etcd.go @@ -7,8 +7,8 @@ import ( "fmt" "time" - "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/pkg/errors" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/transport" diff --git a/kv/etcd/mock.go b/kv/etcd/mock.go index 27e2ffc32..b7ee27645 100644 --- a/kv/etcd/mock.go +++ b/kv/etcd/mock.go @@ -7,7 +7,7 @@ import ( "io" "sync" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" diff --git a/kv/memberlist/broadcast.go b/kv/memberlist/broadcast.go index 7c0a72cf8..6657b73a5 100644 --- a/kv/memberlist/broadcast.go +++ b/kv/memberlist/broadcast.go @@ -3,8 +3,8 @@ package memberlist import ( "fmt" - "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/hashicorp/memberlist" ) diff --git a/kv/memberlist/kv_init_service.go b/kv/memberlist/kv_init_service.go index c137bc786..e63aac2f4 100644 --- a/kv/memberlist/kv_init_service.go +++ b/kv/memberlist/kv_init_service.go @@ -12,7 +12,7 @@ import ( "sync" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" diff --git a/kv/memberlist/memberlist_client.go b/kv/memberlist/memberlist_client.go index 9c385d743..1b21fa5c4 100644 --- a/kv/memberlist/memberlist_client.go +++ b/kv/memberlist/memberlist_client.go @@ -13,8 +13,8 @@ import ( "sync" "time" - "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/hashicorp/memberlist" "github.com/prometheus/client_golang/prometheus" diff --git a/kv/memberlist/memberlist_client_test.go b/kv/memberlist/memberlist_client_test.go index 2b0386b65..a8c6ab590 100644 --- a/kv/memberlist/memberlist_client_test.go +++ b/kv/memberlist/memberlist_client_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/kv/memberlist/memberlist_logger.go b/kv/memberlist/memberlist_logger.go index 36e59306a..6ccb469b6 100644 --- a/kv/memberlist/memberlist_logger.go +++ b/kv/memberlist/memberlist_logger.go @@ -5,8 +5,8 @@ import ( "regexp" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) // loggerAdapter wraps a Logger and allows it to be passed to the stdlib diff --git a/kv/memberlist/metrics.go b/kv/memberlist/metrics.go index 26fd905fb..c7d3f01c2 100644 --- a/kv/memberlist/metrics.go +++ b/kv/memberlist/metrics.go @@ -5,7 +5,7 @@ import ( armonmetrics "github.com/armon/go-metrics" armonprometheus "github.com/armon/go-metrics/prometheus" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" diff --git a/kv/memberlist/tcp_transport.go b/kv/memberlist/tcp_transport.go index 19cf57d72..dc6f9a0ac 100644 --- a/kv/memberlist/tcp_transport.go +++ b/kv/memberlist/tcp_transport.go @@ -12,8 +12,8 @@ import ( "sync" "time" - "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/hashicorp/go-sockaddr" "github.com/hashicorp/memberlist" "github.com/pkg/errors" diff --git a/kv/mock.go b/kv/mock.go index 0854913fb..5b446d854 100644 --- a/kv/mock.go +++ b/kv/mock.go @@ -3,8 +3,8 @@ package kv import ( "context" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) // The mockClient does not anything. diff --git a/kv/multi.go b/kv/multi.go index 233b3a1aa..8a3382e98 100644 --- a/kv/multi.go +++ b/kv/multi.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "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/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "go.uber.org/atomic" diff --git a/modules/module_service.go b/modules/module_service.go index 5efe48d03..b27d0244a 100644 --- a/modules/module_service.go +++ b/modules/module_service.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "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/pkg/errors" "github.com/grafana/dskit/services" diff --git a/modules/module_service_wrapper.go b/modules/module_service_wrapper.go index 4560830d6..39057d837 100644 --- a/modules/module_service_wrapper.go +++ b/modules/module_service_wrapper.go @@ -1,7 +1,7 @@ package modules import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/grafana/dskit/services" ) diff --git a/modules/modules.go b/modules/modules.go index 648ba392d..4aee08d21 100644 --- a/modules/modules.go +++ b/modules/modules.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/pkg/errors" "github.com/grafana/dskit/services" diff --git a/modules/modules_test.go b/modules/modules_test.go index d0823319e..13b041f3f 100644 --- a/modules/modules_test.go +++ b/modules/modules_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ring/basic_lifecycler.go b/ring/basic_lifecycler.go index 69c98c9cc..237bf49c6 100644 --- a/ring/basic_lifecycler.go +++ b/ring/basic_lifecycler.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "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/pkg/errors" "github.com/prometheus/client_golang/prometheus" diff --git a/ring/basic_lifecycler_delegates.go b/ring/basic_lifecycler_delegates.go index 7604a60c5..26e3cfa41 100644 --- a/ring/basic_lifecycler_delegates.go +++ b/ring/basic_lifecycler_delegates.go @@ -5,8 +5,8 @@ import ( "os" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) type LeaveOnStoppingDelegate struct { diff --git a/ring/basic_lifecycler_delegates_test.go b/ring/basic_lifecycler_delegates_test.go index b7a38529d..61324ad0d 100644 --- a/ring/basic_lifecycler_delegates_test.go +++ b/ring/basic_lifecycler_delegates_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ring/basic_lifecycler_test.go b/ring/basic_lifecycler_test.go index ab353e41f..c2a5f61c9 100644 --- a/ring/basic_lifecycler_test.go +++ b/ring/basic_lifecycler_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ring/client/pool.go b/ring/client/pool.go index d387122ce..57b462cc4 100644 --- a/ring/client/pool.go +++ b/ring/client/pool.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "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/prometheus/client_golang/prometheus" "github.com/weaveworks/common/user" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/ring/client/pool_test.go b/ring/client/pool_test.go index 74bd4f08d..9e7028b2e 100644 --- a/ring/client/pool_test.go +++ b/ring/client/pool_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/gogo/status" "github.com/stretchr/testify/require" "google.golang.org/grpc" diff --git a/ring/http.go b/ring/http.go index 2ed4413db..9f961cde3 100644 --- a/ring/http.go +++ b/ring/http.go @@ -11,7 +11,7 @@ import ( "strings" "time" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" ) const pageContent = ` diff --git a/ring/lifecycler.go b/ring/lifecycler.go index aeb811eba..05e1a6b4e 100644 --- a/ring/lifecycler.go +++ b/ring/lifecycler.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "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/pkg/errors" perrors "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" diff --git a/ring/lifecycler_test.go b/ring/lifecycler_test.go index 909dcb92e..810fca15c 100644 --- a/ring/lifecycler_test.go +++ b/ring/lifecycler_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ring/ring.go b/ring/ring.go index 4579f87c8..4f609517e 100644 --- a/ring/ring.go +++ b/ring/ring.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "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/pkg/errors" "github.com/prometheus/client_golang/prometheus" diff --git a/ring/ring_test.go b/ring/ring_test.go index 3c49c7fd4..82193753c 100644 --- a/ring/ring_test.go +++ b/ring/ring_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/ring/util.go b/ring/util.go index 86b476404..a836aa2fc 100644 --- a/ring/util.go +++ b/ring/util.go @@ -9,8 +9,8 @@ import ( "strings" "time" - "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/grafana/dskit/backoff" ) diff --git a/runtimeconfig/manager.go b/runtimeconfig/manager.go index f65066369..dbe564352 100644 --- a/runtimeconfig/manager.go +++ b/runtimeconfig/manager.go @@ -11,8 +11,8 @@ import ( "sync" "time" - "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/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" diff --git a/runtimeconfig/manager_test.go b/runtimeconfig/manager_test.go index 0050e15d4..7aaf95a7f 100644 --- a/runtimeconfig/manager_test.go +++ b/runtimeconfig/manager_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert"