embed: only discard infos when debug flag is off
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>release-3.4
parent
be40d27070
commit
39d0e9c3ca
|
@ -268,8 +268,11 @@ func (cfg *Config) SetupLogging() {
|
||||||
if cfg.Debug {
|
if cfg.Debug {
|
||||||
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
capnslog.SetGlobalLogLevel(capnslog.DEBUG)
|
||||||
grpc.EnableTracing = true
|
grpc.EnableTracing = true
|
||||||
|
// enable info, warning, error
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
|
||||||
} else {
|
} else {
|
||||||
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
|
// only discard info
|
||||||
|
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr))
|
||||||
}
|
}
|
||||||
if cfg.LogPkgLevels != "" {
|
if cfg.LogPkgLevels != "" {
|
||||||
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
|
repoLog := capnslog.MustRepoLogger("github.com/coreos/etcd")
|
||||||
|
|
Loading…
Reference in New Issue