Merge pull request #46414 from thaJeztah/less_logrus

daemon: daemon.createSpec: remove uses of logrus
This commit is contained in:
Sebastiaan van Stijn 2023-09-06 15:32:01 +02:00 committed by GitHub
commit 62725ab277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,6 @@ import (
"path/filepath"
"strings"
"github.com/sirupsen/logrus"
"github.com/containerd/containerd/log"
coci "github.com/containerd/containerd/oci"
containertypes "github.com/docker/docker/api/types/container"
@ -212,7 +210,7 @@ func (daemon *Daemon) createSpec(ctx context.Context, daemonCfg *configStore, c
return nil, err
}
if logrus.IsLevelEnabled(logrus.DebugLevel) {
if log.G(ctx).Level >= log.DebugLevel {
if b, err := json.Marshal(&s); err == nil {
log.G(ctx).Debugf("Generated spec: %s", string(b))
}