Set log output before starting plugin (#7820)
This commit is contained in:
parent
db02ae5829
commit
cd97534315
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue