github.com/moby/docker@v26.1.3+incompatible/libcontainerd/supervisor/remote_daemon_options.go (about) 1 package supervisor // import "github.com/docker/docker/libcontainerd/supervisor" 2 3 import ( 4 "github.com/containerd/log" 5 ) 6 7 // WithLogLevel defines which log level to start containerd with. 8 func WithLogLevel(lvl string) DaemonOpt { 9 return func(r *remote) error { 10 if lvl == "info" { 11 // both dockerd and containerd default log-level is "info", 12 // so don't pass the default. 13 lvl = "" 14 } 15 r.logLevel = lvl 16 return nil 17 } 18 } 19 20 // WithLogFormat defines the containerd log format. 21 // This only makes sense if WithStartDaemon() was set to true. 22 func WithLogFormat(format log.OutputFormat) DaemonOpt { 23 return func(r *remote) error { 24 r.Debug.Format = string(format) 25 return nil 26 } 27 } 28 29 // WithCRIDisabled disables the CRI plugin. 30 func WithCRIDisabled() DaemonOpt { 31 return func(r *remote) error { 32 r.DisabledPlugins = append(r.DisabledPlugins, "io.containerd.grpc.v1.cri") 33 return nil 34 } 35 }