Merge pull request #9623 from ericchiang/grpc-logs

etcdctl/ctlv3/command: enable gRPC WARNING logs by default
release-3.4
Gyuho Lee 2018-04-25 09:44:49 -07:00 committed by GitHub
commit e73f909fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ func clientConfigFromCmd(cmd *cobra.Command) *clientConfig {
fmt.Fprintf(os.Stderr, "%s=%v\n", flags.FlagToEnv("ETCDCTL", f.Name), f.Value)
})
} else {
clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
// Enable logging for WARNING and ERROR since these levels include issues with
// connecting to the server, such as TLS misconfiguration.
clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard, os.Stderr, os.Stderr))
}
cfg := &clientConfig{}