daemon: daemon.createSpec: remove uses of logrus

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-09-06 13:30:33 +02:00
parent 2c95ddf4f3
commit 150b1c8c73
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

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))
}