Skip to content

Commit

Permalink
cmd with --log options does not generate listen-url
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouXing19 committed Aug 11, 2021
1 parent 60331c9 commit 8e13e65
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions testserver/testserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ import (
"testing"
"time"

"github.com/cockroachdb/cockroach-go/v2/testserver/version"
// Import postgres driver.
_ "github.com/lib/pq"

"github.com/cockroachdb/cockroach-go/v2/testserver/version"
)

var customBinaryFlag = flag.String("cockroach-binary", "", "Use specified cockroach binary")
Expand Down Expand Up @@ -292,10 +291,14 @@ func NewTestServer(opts ...TestServerOpt) (TestServer, error) {
startCmd = "start"
}

logOpt := fmt.Sprintf("--log=\"{file-defaults: {dir: %s}, sinks: {stderr: {filter: NONE}}}\"", logDir)
//logOpt := "--log=\"{sinks: {stderr: {filter: INFO}}}\""

args := []string{
cockroachBinary,
startCmd,
"--logtostderr",
//"--logtostderr",
logOpt,
secureOpt,
"--host=localhost",
"--port=0",
Expand Down

0 comments on commit 8e13e65

Please sign in to comment.