From b0280c37a08a77871947b1045073601deb601eaa Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 23 Mar 2016 15:41:47 -0700 Subject: [PATCH] Remove grpc logging to stderr Signed-off-by: Michael Crosby --- libcontainerd/remote_linux.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcontainerd/remote_linux.go b/libcontainerd/remote_linux.go index 27f5e46f29..f0284ca5ca 100644 --- a/libcontainerd/remote_linux.go +++ b/libcontainerd/remote_linux.go @@ -3,6 +3,8 @@ package libcontainerd import ( "fmt" "io" + "io/ioutil" + "log" "net" "os" "os/exec" @@ -18,6 +20,7 @@ import ( "github.com/docker/docker/utils" "golang.org/x/net/context" "google.golang.org/grpc" + "google.golang.org/grpc/grpclog" ) const ( @@ -77,6 +80,8 @@ func New(stateDir string, options ...RemoteOption) (_ Remote, err error) { } } + // don't output the grpc reconnect logging + grpclog.SetLogger(log.New(ioutil.Discard, "", log.LstdFlags)) dialOpts := append([]grpc.DialOption{grpc.WithInsecure()}, grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) { return net.DialTimeout("unix", addr, timeout)