test: send testagent logs through testing.Logf (#6411)
This commit is contained in:
parent
0c5409d172
commit
1b3d066f90
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/hashicorp/consul/api"
|
||||
"github.com/hashicorp/consul/logger"
|
||||
"github.com/hashicorp/consul/sdk/freeport"
|
||||
"github.com/hashicorp/consul/sdk/testutil"
|
||||
"github.com/hashicorp/consul/sdk/testutil/retry"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
@ -149,7 +150,7 @@ func (a *TestAgent) Start(t *testing.T) *TestAgent {
|
|||
|
||||
logOutput := a.LogOutput
|
||||
if logOutput == nil {
|
||||
logOutput = os.Stderr
|
||||
logOutput = testutil.TestWriter(t)
|
||||
}
|
||||
agentLogger := log.New(logOutput, a.Name+" - ", log.LstdFlags|log.Lmicroseconds)
|
||||
|
||||
|
|
Loading…
Reference in a new issue