summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-08-10 18:27:07 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-08-11 14:11:06 +0200
commitb6b0b0a05fe51c50e63d0149e6d070fbb3e0af8d (patch)
tree5de1ae2b8770cab5fdef6ef7b01d3d7196ce8260 /cmd
parentbff3e85625d804013e74f8b1489c61a237a73320 (diff)
downloaddocker-b6b0b0a05fe51c50e63d0149e6d070fbb3e0af8d.tar.gz
libcontainerd/supervisor: don't write log-level to config file
the `--log-level` flag overrides whatever is in the containerd configuration file; https://github.com/containerd/containerd/blob/f033f6ff85ce397202ee69de22b4e3a4bf4093f5/cmd/containerd/command/main.go#L339-L352 Given that we set that flag when we start the containerd binary, there is no need to write it both to the generated config-file and pass it as flag. This patch also slightly changes the behavior; as both dockerd and containerd use "info" as default log-level, don't set the log-level if it's the default. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dockerd/daemon.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/dockerd/daemon.go b/cmd/dockerd/daemon.go
index 5ade4f34ff..a93e93f5d7 100644
--- a/cmd/dockerd/daemon.go
+++ b/cmd/dockerd/daemon.go
@@ -589,13 +589,13 @@ func (cli *DaemonCli) getContainerdDaemonOpts() ([]supervisor.DaemonOpt, error)
return nil, err
}
- if cli.Config.Debug {
+ if cli.Debug {
opts = append(opts, supervisor.WithLogLevel("debug"))
- } else if cli.Config.LogLevel != "" {
- opts = append(opts, supervisor.WithLogLevel(cli.Config.LogLevel))
+ } else {
+ opts = append(opts, supervisor.WithLogLevel(cli.LogLevel))
}
- if !cli.Config.CriContainerd {
+ if !cli.CriContainerd {
// CRI support in the managed daemon is currently opt-in.
//
// It's disabled by default, originally because it was listening on