Skip to content

Commit

Permalink
embed: disable grpc server logging by default
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <[email protected]>
  • Loading branch information
gyuho committed Nov 2, 2017
1 parent 1fa295e commit 6127f78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions embed/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/coreos/pkg/capnslog"
"github.com/ghodss/yaml"
"google.golang.org/grpc"
"google.golang.org/grpc/grpclog"
)

const (
Expand Down Expand Up @@ -244,6 +245,8 @@ func (cfg *Config) SetupLogging() {
if cfg.Debug {
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
grpc.EnableTracing = true
} else {
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
}
if cfg.LogPkgLevels != "" {
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
Expand Down

0 comments on commit 6127f78

Please sign in to comment.