Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit b0280c37a08a77871947b1045073601deb601eaa)
| ... | ... |
@@ -3,6 +3,8 @@ package libcontainerd |
| 3 | 3 |
import ( |
| 4 | 4 |
"fmt" |
| 5 | 5 |
"io" |
| 6 |
+ "io/ioutil" |
|
| 7 |
+ "log" |
|
| 6 | 8 |
"net" |
| 7 | 9 |
"os" |
| 8 | 10 |
"os/exec" |
| ... | ... |
@@ -18,6 +20,7 @@ import ( |
| 18 | 18 |
"github.com/docker/docker/utils" |
| 19 | 19 |
"golang.org/x/net/context" |
| 20 | 20 |
"google.golang.org/grpc" |
| 21 |
+ "google.golang.org/grpc/grpclog" |
|
| 21 | 22 |
) |
| 22 | 23 |
|
| 23 | 24 |
const ( |
| ... | ... |
@@ -77,6 +80,8 @@ func New(stateDir string, options ...RemoteOption) (_ Remote, err error) {
|
| 77 | 77 |
} |
| 78 | 78 |
} |
| 79 | 79 |
|
| 80 |
+ // don't output the grpc reconnect logging |
|
| 81 |
+ grpclog.SetLogger(log.New(ioutil.Discard, "", log.LstdFlags)) |
|
| 80 | 82 |
dialOpts := append([]grpc.DialOption{grpc.WithInsecure()},
|
| 81 | 83 |
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
|
| 82 | 84 |
return net.DialTimeout("unix", addr, timeout)
|