@@ -5,20 +5,17 @@ package linux
55import (
66 "context"
77 "fmt"
8- "io/ioutil"
9- "log"
108 "net"
119 "os/exec"
1210 "path/filepath"
1311 "syscall"
1412 "time"
1513
1614 "google.golang.org/grpc"
17- "google.golang.org/grpc/grpclog"
1815
1916 "github.com/containerd/containerd/api/services/shim"
2017 localShim "github.com/containerd/containerd/linux/shim"
21- containerdlog "github.com/containerd/containerd/log"
18+ "github.com/containerd/containerd/log"
2219 "github.com/containerd/containerd/reaper"
2320 "github.com/containerd/containerd/sys"
2421 "github.com/pkg/errors"
@@ -58,7 +55,7 @@ func newShim(ctx context.Context, shimName string, path, namespace string, remot
5855 cmd .Process .Kill ()
5956 reaper .Default .Wait (cmd )
6057 } else {
61- containerdlog .G (ctx ).WithField ("socket" , socket ).Infof ("new shim started" )
58+ log .G (ctx ).WithField ("socket" , socket ).Infof ("new shim started" )
6259 }
6360 }()
6461 if err = sys .SetOOMScore (cmd .Process .Pid , sys .OOMScoreMaxKillable ); err != nil {
@@ -77,7 +74,6 @@ func loadShim(path, namespace string, remote bool) (shim.ShimClient, error) {
7774
7875func connectShim (socket string ) (shim.ShimClient , error ) {
7976 // reset the logger for grpc to log to dev/null so that it does not mess with our stdio
80- grpclog .SetLogger (log .New (ioutil .Discard , "" , log .LstdFlags ))
8177 dialOpts := []grpc.DialOption {grpc .WithInsecure (), grpc .WithTimeout (100 * time .Second )}
8278 dialOpts = append (dialOpts ,
8379 grpc .WithDialer (func (addr string , timeout time.Duration ) (net.Conn , error ) {
0 commit comments