mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove grpc logging to stderr
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit b0280c37a0
)
This commit is contained in:
parent
6558158dc3
commit
e4995d1517
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,8 @@ package libcontainerd
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
@ -18,6 +20,7 @@ import (
|
||||||
"github.com/docker/docker/utils"
|
"github.com/docker/docker/utils"
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
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()},
|
dialOpts := append([]grpc.DialOption{grpc.WithInsecure()},
|
||||||
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
|
grpc.WithDialer(func(addr string, timeout time.Duration) (net.Conn, error) {
|
||||||
return net.DialTimeout("unix", addr, timeout)
|
return net.DialTimeout("unix", addr, timeout)
|
||||||
|
|
Loading…
Add table
Reference in a new issue