Set log output before starting plugin (#7820)

This commit is contained in:
Daniel Nelson 2020-07-10 13:58:38 -07:00 committed by GitHub
parent db02ae5829
commit cd97534315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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
@ -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)