From 75f13c6156c2d04daf9bf10f6ffd4d707028dce3 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 8 Sep 2017 14:42:30 -0700 Subject: [PATCH] *: use grpclog.LoggerV2 Signed-off-by: Gyu-Ho Lee --- tools/benchmark/cmd/util.go | 5 +++-- tools/functional-tester/etcd-tester/stresser.go | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/benchmark/cmd/util.go b/tools/benchmark/cmd/util.go index a5872913dfc..4af0b7acd8d 100644 --- a/tools/benchmark/cmd/util.go +++ b/tools/benchmark/cmd/util.go @@ -17,13 +17,14 @@ package cmd import ( "crypto/rand" "fmt" - "log" "os" "strings" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/report" + "golang.org/x/net/context" + "google.golang.org/grpc/grpclog" ) var ( @@ -98,7 +99,7 @@ func mustCreateConn() *clientv3.Client { return mustCreateConn() } - clientv3.SetLogger(log.New(os.Stderr, "grpc", 0)) + clientv3.SetLogger(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr)) if err != nil { fmt.Fprintf(os.Stderr, "dial error: %v\n", err) diff --git a/tools/functional-tester/etcd-tester/stresser.go b/tools/functional-tester/etcd-tester/stresser.go index 30e8d47d703..4c5cdcef63c 100644 --- a/tools/functional-tester/etcd-tester/stresser.go +++ b/tools/functional-tester/etcd-tester/stresser.go @@ -16,6 +16,7 @@ package main import ( "fmt" + "os" "strings" "sync" "time" @@ -24,7 +25,7 @@ import ( "google.golang.org/grpc/grpclog" ) -func init() { grpclog.SetLogger(plog) } +func init() { grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr)) } type Stresser interface { // Stress starts to stress the etcd cluster