Skip to content

Commit

Permalink
Add missing logger init in New() functions (#16915) (#17087)
Browse files Browse the repository at this point in the history
* Add missing logger init in New() functions

(cherry picked from commit e64a18f)
  • Loading branch information
kaiyan-sheng authored Mar 18, 2020
1 parent 94ad401 commit 2cd1212
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libbeat/reader/readjson/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2cd1212

Please sign in to comment.