Merge pull request #63186 from Random-Liu/fix-remote-client-log

Automatic merge from submit-queue (batch tested with PRs 63186, 63133). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add level to remote client glog.

Set log level for remote client glog.

There is no way to disable `glog.Infof()` when `logtostderr` is specified. Because of this, `crictl logs` will always output an annoying line now:
```
# crictl logs 8a7d0379367b7
I0426 08:34:13.679995    6949 remote_runtime.go:43] Connecting to runtime service unix:///run/containerd/containerd.sock
I0426 02:20:19.389765       1 main.go:76] opts: {{/usr/sbin/dnsmasq [-k --cache-size=1000 --no-negcache --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053] true} /etc/k8s/dns/dnsmasq-nanny 10000000000}
I0426 02:20:19.390103       1 nanny.go:94] Starting dnsmasq [-k --cache-size=1000 --no-negcache --log-facility=- --server=/cluster.local/127.0.0.1#10053 --server=/in-addr.arpa/127.0.0.1#10053 --server=/ip6.arpa/127.0.0.1#10053]
```

This PR sets a level for the log, so that it won't show up in `crictl logs`.

Signed-off-by: Lantao Liu <lantaol@google.com>

**Release note**:

```release-note
none
```
This commit is contained in:
Kubernetes Submit Queue 2018-04-26 04:50:10 -07:00 committed by GitHub
commit c89174e566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,7 @@ type RemoteRuntimeService struct {
// NewRemoteRuntimeService creates a new internalapi.RuntimeService.
func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (internalapi.RuntimeService, error) {
glog.Infof("Connecting to runtime service %s", endpoint)
glog.V(3).Infof("Connecting to runtime service %s", endpoint)
addr, dailer, err := util.GetAddressAndDialer(endpoint)
if err != nil {
return nil, err