Skip to content

Commit

Permalink
*: use grpclog.LoggerV2
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Nov 13, 2017
1 parent 85fdf3e commit d153dfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions tools/benchmark/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion tools/functional-tester/etcd-tester/stresser.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package main

import (
"fmt"
"os"
"strings"
"sync"
"time"
Expand All @@ -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
Expand Down

0 comments on commit d153dfd

Please sign in to comment.