Use logger Interface in runtime configuration

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2023-05-26 10:15:27 +02:00
parent a02bc27c3e
commit c9b05d8fed
6 changed files with 50 additions and 15 deletions

View File

@@ -155,14 +155,17 @@ func (m command) configureWrapper(c *cli.Context, config *config) error {
switch config.runtime {
case "containerd":
cfg, err = containerd.New(
containerd.WithLogger(m.logger),
containerd.WithPath(configFilePath),
)
case "crio":
cfg, err = crio.New(
crio.WithLogger(m.logger),
crio.WithPath(configFilePath),
)
case "docker":
cfg, err = docker.New(
docker.WithLogger(m.logger),
docker.WithPath(configFilePath),
)
default: