Skip to content

Commit

Permalink
Set log output before starting plugin (influxdata#7820)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored Jul 10, 2020
1 parent db02ae5 commit cd97534
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/inputs/tail/tail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func TestTailBadLine(t *testing.T) {

tmpfile.Close()

buf := &bytes.Buffer{}
log.SetOutput(buf)

tt := NewTail()
tt.Log = testutil.Logger{}
tt.FromBeginning = true
Expand All @@ -44,9 +47,6 @@ func TestTailBadLine(t *testing.T) {
acc := testutil.Accumulator{}
require.NoError(t, tt.Start(&acc))

buf := &bytes.Buffer{}
log.SetOutput(buf)

require.NoError(t, acc.GatherError(tt.Gather))

acc.Wait(1)
Expand Down

0 comments on commit cd97534

Please sign in to comment.