mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
test: send testagent logs through testing.Logf (#6411)
This commit is contained in:
parent
91da908d2f
commit
b962fe38cd
@ -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…
x
Reference in New Issue
Block a user