*: use capnslog for grpclog

This commit is contained in:
Gyu-Ho Lee 2016-06-20 19:39:22 -07:00
parent 6d81601df3
commit a1c7a7df5e
2 changed files with 7 additions and 3 deletions

View File

@ -20,10 +20,16 @@ import (
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/pkg/capnslog"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
)
func init() {
grpclog.SetLogger(capnslog.NewPackageLogger("github.com/coreos/etcd/etcdserver", "v3rpc/grpc"))
}
func Server(s *etcdserver.EtcdServer, tls *tls.Config) *grpc.Server {
var opts []grpc.ServerOption
opts = append(opts, grpc.CustomCodec(&codec{}))

View File

@ -16,8 +16,6 @@ package main
import (
"fmt"
"io/ioutil"
"log"
"math/rand"
"net"
"net/http"
@ -35,7 +33,7 @@ import (
)
func init() {
grpclog.SetLogger(log.New(ioutil.Discard, "", 0))
grpclog.SetLogger(plog)
}
type Stresser interface {