diff --git a/interceptors/logging/interceptors_test.go b/interceptors/logging/interceptors_test.go index d1f15f28b..a4526c143 100644 --- a/interceptors/logging/interceptors_test.go +++ b/interceptors/logging/interceptors_test.go @@ -5,6 +5,7 @@ import ( "fmt" "io" "runtime" + "sort" "strings" "sync" "testing" @@ -66,9 +67,6 @@ func (l LogLines) Less(i, j int) bool { if l[i].msg != l[j].msg { return l[i].msg < l[j].msg } - //_ , aok = l[i].fields["grpc.response.content"] - //_ ,baok = l[i].fields["grpc.response.content"] - //if // We want to sort by counter which in string, so we need to parse it. a := testpb.PingResponse{} @@ -88,47 +86,51 @@ func (l LogLines) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -type baseMockLogger struct { - // Shared. It's slice on purpose to find potential duplicates. - lines []LogLine +type mockStdOutput struct { + // All the output of the mockLogger is shared in a single + // shared slice. Behaves like a stdout which contains all + // the log lines. + lines LogLines m sync.Mutex } -func (l *baseMockLogger) Add(line LogLine) { +func (l *mockStdOutput) Lines() LogLines { l.m.Lock() defer l.m.Unlock() - l.lines = append(l.lines, line) -} + retLines := make(LogLines, len(l.lines)) + copy(retLines, l.lines) -func (l *baseMockLogger) Lines() []LogLine { - l.m.Lock() - defer l.m.Unlock() - - return l.lines + return retLines } type mockLogger struct { - *baseMockLogger + *mockStdOutput fields logging.Fields } func (l *mockLogger) Log(lvl logging.Level, msg string) { + l.m.Lock() + defer l.m.Unlock() + line := LogLine{ lvl: lvl, msg: msg, fields: map[string]string{}, } + for i := 0; i < len(l.fields); i += 2 { line.fields[l.fields[i]] = l.fields[i+1] } - l.Add(line) + l.lines = append(l.lines, line) } func (l *mockLogger) With(fields ...string) logging.Logger { - // Append twice to copy slice, so we don't reuse array. - return &mockLogger{baseMockLogger: l.baseMockLogger, fields: append(append(logging.Fields{}, l.fields...), fields...)} + l.m.Lock() + defer l.m.Unlock() + + return &mockLogger{mockStdOutput: l.mockStdOutput, fields: append(append(logging.Fields{}, l.fields...), fields...)} } type baseLoggingSuite struct { @@ -161,7 +163,7 @@ func TestSuite(t *testing.T) { s := &loggingClientServerSuite{ &baseLoggingSuite{ - logger: &mockLogger{baseMockLogger: &baseMockLogger{}}, + logger: &mockLogger{mockStdOutput: &mockStdOutput{}}, InterceptorTestSuite: &grpctesting.InterceptorTestSuite{ TestService: &grpctesting.TestPingService{T: t}, }, @@ -193,15 +195,17 @@ func assertStandardFields(t *testing.T, kind string, f testDisposableFields, met func (s *loggingClientServerSuite) TestPing() { _, err := s.Client.Ping(s.SimpleCtx(), goodPing) assert.NoError(s.T(), err, "there must be not be an on a successful call") + lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 4) - clientStartCallLogLine := lines[0] + clientStartCallLogLine := lines[1] assert.Equal(s.T(), logging.DEBUG, clientStartCallLogLine.lvl) assert.Equal(s.T(), "started call", clientStartCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindClientFieldValue, clientStartCallLogLine.fields, "Ping", interceptors.Unary) - serverStartCallLogLine := lines[1] + serverStartCallLogLine := lines[3] assert.Equal(s.T(), logging.DEBUG, serverStartCallLogLine.lvl) assert.Equal(s.T(), "started call", serverStartCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindServerFieldValue, serverStartCallLogLine.fields, "Ping", interceptors.Unary) @@ -217,7 +221,7 @@ func (s *loggingClientServerSuite) TestPing() { AssertNextField(s.T(), "grpc.code", "OK"). AssertNextFieldNotEmpty(s.T(), "grpc.time_ms").AssertNoMoreTags(s.T()) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(s.T(), logging.DEBUG, clientFinishCallLogLine.lvl) assert.Equal(s.T(), "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(s.T(), logging.KindClientFieldValue, clientFinishCallLogLine.fields, "Ping", interceptors.Unary) @@ -238,14 +242,15 @@ func (s *loggingClientServerSuite) TestPingList() { require.NoError(s.T(), err, "reading stream should not fail") } lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 4) - serverStartCallLogLine := lines[1] + serverStartCallLogLine := lines[3] assert.Equal(s.T(), logging.DEBUG, serverStartCallLogLine.lvl) assert.Equal(s.T(), "started call", serverStartCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindServerFieldValue, serverStartCallLogLine.fields, "PingList", interceptors.ServerStream) - clientStartCallLogLine := lines[0] + clientStartCallLogLine := lines[1] assert.Equal(s.T(), logging.DEBUG, clientStartCallLogLine.lvl) assert.Equal(s.T(), "started call", clientStartCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindClientFieldValue, clientStartCallLogLine.fields, "PingList", interceptors.ServerStream) @@ -261,7 +266,7 @@ func (s *loggingClientServerSuite) TestPingList() { AssertNextField(s.T(), "grpc.code", "OK"). AssertNextFieldNotEmpty(s.T(), "grpc.time_ms").AssertNoMoreTags(s.T()) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(s.T(), logging.DEBUG, clientFinishCallLogLine.lvl) assert.Equal(s.T(), "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(s.T(), logging.KindClientFieldValue, clientFinishCallLogLine.fields, "PingList", interceptors.ServerStream) @@ -305,6 +310,7 @@ func (s *loggingClientServerSuite) TestPingError_WithCustomLevels() { &testpb.PingRequest{Value: "something", ErrorCodeReturned: uint32(tcase.code)}) require.Error(t, err, "each call here must return an error") lines := s.logger.Lines() + sort.Sort(lines) require.Len(t, lines, 4) serverFinishCallLogLine := lines[2] @@ -319,7 +325,7 @@ func (s *loggingClientServerSuite) TestPingError_WithCustomLevels() { AssertNextField(t, "grpc.error", fmt.Sprintf("rpc error: code = %s desc = Userspace error.", tcase.code.String())). AssertNextFieldNotEmpty(t, "grpc.time_ms").AssertNoMoreTags(t) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(t, tcase.level, clientFinishCallLogLine.lvl) assert.Equal(t, "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(t, logging.KindClientFieldValue, clientFinishCallLogLine.fields, "PingError", interceptors.Unary) @@ -344,7 +350,7 @@ func TestCustomDurationSuite(t *testing.T) { s := &loggingCustomDurationSuite{ baseLoggingSuite: &baseLoggingSuite{ - logger: &mockLogger{baseMockLogger: &baseMockLogger{}}, + logger: &mockLogger{mockStdOutput: &mockStdOutput{}}, InterceptorTestSuite: &grpctesting.InterceptorTestSuite{ TestService: &grpctesting.TestPingService{T: t}, }, @@ -370,14 +376,15 @@ func (s *loggingCustomDurationSuite) TestPing_HasOverriddenDuration() { assert.NoError(s.T(), err, "there must be not be an on a successful call") lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 4) - serverStartedCallLogLine := lines[1] + serverStartedCallLogLine := lines[3] assert.Equal(s.T(), logging.INFO, serverStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", serverStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindServerFieldValue, serverStartedCallLogLine.fields, "Ping", interceptors.Unary) - clientStartedCallLogLine := lines[0] + clientStartedCallLogLine := lines[1] assert.Equal(s.T(), logging.DEBUG, clientStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", clientStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindClientFieldValue, clientStartedCallLogLine.fields, "Ping", interceptors.Unary) @@ -393,7 +400,7 @@ func (s *loggingCustomDurationSuite) TestPing_HasOverriddenDuration() { AssertNextField(s.T(), "grpc.code", "OK"). AssertNextFieldNotEmpty(s.T(), "grpc.duration").AssertNoMoreTags(s.T()) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(s.T(), logging.DEBUG, clientFinishCallLogLine.lvl) assert.Equal(s.T(), "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(s.T(), logging.KindClientFieldValue, clientFinishCallLogLine.fields, "Ping", interceptors.Unary) @@ -415,14 +422,15 @@ func (s *loggingCustomDurationSuite) TestPingList_HasOverriddenDuration() { } lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 4) - serverStartedCallLogLine := lines[1] + serverStartedCallLogLine := lines[3] assert.Equal(s.T(), logging.INFO, serverStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", serverStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindServerFieldValue, serverStartedCallLogLine.fields, "PingList", interceptors.ServerStream) - clientStartedCallLogLine := lines[0] + clientStartedCallLogLine := lines[1] assert.Equal(s.T(), logging.DEBUG, clientStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", clientStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindClientFieldValue, clientStartedCallLogLine.fields, "PingList", interceptors.ServerStream) @@ -438,7 +446,7 @@ func (s *loggingCustomDurationSuite) TestPingList_HasOverriddenDuration() { AssertNextField(s.T(), "grpc.code", "OK"). AssertNextFieldNotEmpty(s.T(), "grpc.duration").AssertNoMoreTags(s.T()) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(s.T(), logging.DEBUG, clientFinishCallLogLine.lvl) assert.Equal(s.T(), "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(s.T(), logging.KindClientFieldValue, clientFinishCallLogLine.fields, "PingList", interceptors.ServerStream) @@ -466,7 +474,7 @@ func TestCustomDeciderSuite(t *testing.T) { s := &loggingCustomDeciderSuite{ baseLoggingSuite: &baseLoggingSuite{ - logger: &mockLogger{baseMockLogger: &baseMockLogger{}}, + logger: &mockLogger{mockStdOutput: &mockStdOutput{}}, InterceptorTestSuite: &grpctesting.InterceptorTestSuite{ TestService: &grpctesting.TestPingService{T: t}, }, @@ -503,14 +511,15 @@ func (s *loggingCustomDeciderSuite) TestPingError_HasCustomDecider() { require.Error(s.T(), err, "each call here must return an error") lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 4) - serverStartedCallLogLine := lines[1] + serverStartedCallLogLine := lines[3] assert.Equal(s.T(), logging.INFO, serverStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", serverStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindServerFieldValue, serverStartedCallLogLine.fields, "PingError", interceptors.Unary) - clientStartedCallLogLine := lines[0] + clientStartedCallLogLine := lines[1] assert.Equal(s.T(), logging.DEBUG, clientStartedCallLogLine.lvl) assert.Equal(s.T(), "started call", clientStartedCallLogLine.msg) _ = assertStandardFields(s.T(), logging.KindClientFieldValue, clientStartedCallLogLine.fields, "PingError", interceptors.Unary) @@ -527,7 +536,7 @@ func (s *loggingCustomDeciderSuite) TestPingError_HasCustomDecider() { AssertNextField(s.T(), "grpc.error", "rpc error: code = NotFound desc = Userspace error."). AssertNextFieldNotEmpty(s.T(), "grpc.time_ms").AssertNoMoreTags(s.T()) - clientFinishCallLogLine := lines[3] + clientFinishCallLogLine := lines[0] assert.Equal(s.T(), logging.DEBUG, clientFinishCallLogLine.lvl) assert.Equal(s.T(), "finished call", clientFinishCallLogLine.msg) clientFinishCallFields := assertStandardFields(s.T(), logging.KindClientFieldValue, clientFinishCallLogLine.fields, "PingError", interceptors.Unary) diff --git a/interceptors/logging/payload_test.go b/interceptors/logging/payload_test.go index 1acdc0153..e2d24c859 100644 --- a/interceptors/logging/payload_test.go +++ b/interceptors/logging/payload_test.go @@ -36,7 +36,7 @@ func TestPayloadSuite(t *testing.T) { s := &loggingPayloadSuite{ baseLoggingSuite: &baseLoggingSuite{ - logger: &mockLogger{baseMockLogger: &baseMockLogger{}}, + logger: &mockLogger{mockStdOutput: &mockStdOutput{}}, InterceptorTestSuite: &grpctesting.InterceptorTestSuite{ TestService: &grpctesting.TestPingService{T: t}, }, @@ -136,6 +136,7 @@ func (s *loggingPayloadSuite) TestPingError_LogsOnlyRequestsOnError() { require.Error(s.T(), err, "there must be an error on an unsuccessful call") lines := s.logger.Lines() + sort.Sort(lines) require.Len(s.T(), lines, 2) // Only client & server requests. clientRequestLogLine := lines[0] diff --git a/providers/kit/go.mod b/providers/kit/go.mod index 3a766d76f..046f207a6 100644 --- a/providers/kit/go.mod +++ b/providers/kit/go.mod @@ -4,6 +4,6 @@ go 1.14 require ( github.com/go-kit/kit v0.10.0 - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 google.golang.org/grpc v1.26.0 ) diff --git a/providers/kit/go.sum b/providers/kit/go.sum index f57c555bf..c139da7d4 100644 --- a/providers/kit/go.sum +++ b/providers/kit/go.sum @@ -98,6 +98,8 @@ github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea h1:1Tk1IbruXbunEnaIZEFb+Hpv9BIZti3OxKwKn5wWyKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 h1:2F7/en805byWQR92etfFjOqtRtWsUu09R7wm6LtlHEw= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= @@ -191,6 +193,7 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= diff --git a/providers/logrus/go.mod b/providers/logrus/go.mod index 7d99f1fdc..fb21909c9 100644 --- a/providers/logrus/go.mod +++ b/providers/logrus/go.mod @@ -3,7 +3,7 @@ module github.com/grpc-ecosystem/go-grpc-middleware/providers/logrus/v2 go 1.14 require ( - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 github.com/sirupsen/logrus v1.5.0 google.golang.org/grpc v1.19.0 ) diff --git a/providers/logrus/go.sum b/providers/logrus/go.sum index fbad7081b..b0cb2e848 100644 --- a/providers/logrus/go.sum +++ b/providers/logrus/go.sum @@ -14,11 +14,14 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea h1:1Tk1IbruXbunEnaIZEFb+Hpv9BIZti3OxKwKn5wWyKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 h1:2F7/en805byWQR92etfFjOqtRtWsUu09R7wm6LtlHEw= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q= diff --git a/providers/zap/go.mod b/providers/zap/go.mod index 604d03952..e3cde6c07 100644 --- a/providers/zap/go.mod +++ b/providers/zap/go.mod @@ -3,7 +3,7 @@ module github.com/grpc-ecosystem/go-grpc-middleware/providers/zap/v2 go 1.14 require ( - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 go.uber.org/zap v1.15.0 google.golang.org/grpc v1.19.0 ) diff --git a/providers/zap/go.sum b/providers/zap/go.sum index 6048ee1b4..943c5a98d 100644 --- a/providers/zap/go.sum +++ b/providers/zap/go.sum @@ -16,6 +16,8 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea h1:1Tk1IbruXbunEnaIZEFb+Hpv9BIZti3OxKwKn5wWyKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 h1:2F7/en805byWQR92etfFjOqtRtWsUu09R7wm6LtlHEw= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -26,6 +28,7 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= diff --git a/providers/zerolog/go.mod b/providers/zerolog/go.mod index 7aa781af8..2dba6ac32 100644 --- a/providers/zerolog/go.mod +++ b/providers/zerolog/go.mod @@ -3,7 +3,7 @@ module github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 go 1.14 require ( - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 github.com/rs/zerolog v1.19.0 google.golang.org/grpc v1.19.0 ) diff --git a/providers/zerolog/go.sum b/providers/zerolog/go.sum index a23fc41a7..98e99c8e9 100644 --- a/providers/zerolog/go.sum +++ b/providers/zerolog/go.sum @@ -14,10 +14,13 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea h1:1Tk1IbruXbunEnaIZEFb+Hpv9BIZti3OxKwKn5wWyKk= github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891 h1:2F7/en805byWQR92etfFjOqtRtWsUu09R7wm6LtlHEw= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201002093600-73cf2ae9d891/go.mod h1:GhphxcdlaRyAuBSvo6rV71BvQcvB/vuX8ugCyybuS2k= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=