Merge pull request #9016 from djdongjin/remove-most-logrus
Remove most logrus import
This commit is contained in:
@@ -29,7 +29,6 @@ import (
|
||||
"github.com/containerd/containerd/pkg/kmutex"
|
||||
"github.com/containerd/containerd/reference/docker"
|
||||
imagedigest "github.com/opencontainers/go-digest"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type CRIImageService struct {
|
||||
@@ -64,7 +63,7 @@ func NewService(config criconfig.Config, imageFSPath string, client *containerd.
|
||||
}
|
||||
|
||||
// Start snapshot stats syncer, it doesn't need to be stopped.
|
||||
logrus.Info("Start snapshots syncer")
|
||||
log.L.Info("Start snapshots syncer")
|
||||
snapshotsSyncer := newSnapshotsSyncer(
|
||||
svc.snapshotStore,
|
||||
svc.client.SnapshotService(svc.config.ContainerdConfig.Snapshotter),
|
||||
|
||||
@@ -33,7 +33,6 @@ import (
|
||||
ctrdutil "github.com/containerd/containerd/pkg/cri/util"
|
||||
"github.com/containerd/containerd/reference/docker"
|
||||
runtimespec "github.com/opencontainers/runtime-spec/specs-go"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
imagedigest "github.com/opencontainers/go-digest"
|
||||
)
|
||||
@@ -111,7 +110,7 @@ func buildLabels(configLabels, imageConfigLabels map[string]string, containerTyp
|
||||
} else {
|
||||
// In case the image label is invalid, we output a warning and skip adding it to the
|
||||
// container.
|
||||
logrus.WithError(err).Warnf("unable to add image label with key %s to the container", k)
|
||||
log.L.WithError(err).Warnf("unable to add image label with key %s to the container", k)
|
||||
}
|
||||
}
|
||||
// labels from the CRI request (config) will override labels in the image config
|
||||
|
||||
@@ -22,10 +22,9 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
eventtypes "github.com/containerd/containerd/api/events"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/log"
|
||||
sandboxstore "github.com/containerd/containerd/pkg/cri/store/sandbox"
|
||||
ctrdutil "github.com/containerd/containerd/pkg/cri/util"
|
||||
"github.com/containerd/containerd/protobuf"
|
||||
@@ -98,7 +97,7 @@ func (c *Controller) stopSandboxContainer(ctx context.Context, sandbox sandboxst
|
||||
ExitStatus: exitStatus,
|
||||
ExitedAt: protobuf.ToTimestamp(exitedAt),
|
||||
}
|
||||
logrus.WithError(err).Errorf("Failed to wait sandbox exit %+v", e)
|
||||
log.G(ctx).WithError(err).Errorf("Failed to wait sandbox exit %+v", e)
|
||||
// TODO: how to backoff
|
||||
c.cri.BackOffEvent(id, e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user