From 2cd121248216ffd5364dc7235826fac0fb8f9782 Mon Sep 17 00:00:00 2001 From: kaiyan-sheng Date: Wed, 18 Mar 2020 12:55:44 -0600 Subject: [PATCH] Add missing logger init in New() functions (#16915) (#17087) * Add missing logger init in New() functions (cherry picked from commit e64a18fe58e576e7ac79578d20c7ca92e20af63f) --- libbeat/reader/readjson/json_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libbeat/reader/readjson/json_test.go b/libbeat/reader/readjson/json_test.go index 7d88b032c971..b0470c4512b7 100644 --- a/libbeat/reader/readjson/json_test.go +++ b/libbeat/reader/readjson/json_test.go @@ -21,6 +21,8 @@ import ( "testing" "time" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/stretchr/testify/assert" "github.com/elastic/beats/v7/libbeat/common" @@ -185,6 +187,7 @@ func TestDecodeJSON(t *testing.T) { var p JSONReader p.cfg = &test.Config + p.logger = logp.NewLogger("json_test") text, M := p.decode([]byte(test.Text)) assert.Equal(t, test.ExpectedText, string(text)) assert.Equal(t, test.ExpectedMap, M)