Parcourir la source

Merge pull request #7097 from heyitsanthony/benchmark-verbose

benchmark: enable grpc error logging on stderr
Anthony Romano il y a 9 ans
Parent
commit
559a82f66e
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      tools/benchmark/cmd/util.go

+ 3 - 0
tools/benchmark/cmd/util.go

@@ -17,6 +17,7 @@ package cmd
 import (
 	"crypto/rand"
 	"fmt"
+	"log"
 	"os"
 	"strings"
 
@@ -58,6 +59,8 @@ func mustCreateConn() *clientv3.Client {
 	}
 
 	client, err := clientv3.New(cfg)
+	clientv3.SetLogger(log.New(os.Stderr, "grpc", 0))
+
 	if err != nil {
 		fmt.Fprintf(os.Stderr, "dial error: %v\n", err)
 		os.Exit(1)