2018-05-23 19:15:21 +00:00
|
|
|
package supervisor // import "github.com/docker/docker/libcontainerd/supervisor"
|
|
|
|
|
2022-08-10 16:27:07 +00:00
|
|
|
// WithLogLevel defines which log level to start containerd with.
|
2018-05-23 19:15:21 +00:00
|
|
|
func WithLogLevel(lvl string) DaemonOpt {
|
|
|
|
return func(r *remote) error {
|
2022-08-10 16:27:07 +00:00
|
|
|
if lvl == "info" {
|
|
|
|
// both dockerd and containerd default log-level is "info",
|
|
|
|
// so don't pass the default.
|
|
|
|
lvl = ""
|
|
|
|
}
|
|
|
|
r.logLevel = lvl
|
2018-05-23 19:15:21 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-08-03 08:38:15 +00:00
|
|
|
// WithCRIDisabled disables the CRI plugin.
|
|
|
|
func WithCRIDisabled() DaemonOpt {
|
2018-05-23 19:15:21 +00:00
|
|
|
return func(r *remote) error {
|
2022-08-03 08:38:15 +00:00
|
|
|
r.DisabledPlugins = append(r.DisabledPlugins, "io.containerd.grpc.v1.cri")
|
2018-05-23 19:15:21 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|