Remove most logrus

Signed-off-by: Jin Dong <jin.dong@databricks.com>
This commit is contained in:
Jin Dong
2023-08-26 13:17:03 -04:00
parent 03e4f1e363
commit fc45365fa1
31 changed files with 84 additions and 94 deletions

View File

@@ -25,7 +25,6 @@ import (
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/namespaces"
nri "github.com/containerd/nri/pkg/adaptation"
"github.com/sirupsen/logrus"
)
// Domain implements the functions the generic NRI interface needs to
@@ -57,10 +56,10 @@ type Domain interface {
func RegisterDomain(d Domain) {
err := domains.add(d)
if err != nil {
logrus.WithError(err).Fatalf("Failed to register namespace %q with NRI", d.GetName())
log.L.WithError(err).Fatalf("Failed to register namespace %q with NRI", d.GetName())
}
logrus.Infof("Registered namespace %q with NRI", d.GetName())
log.L.Infof("Registered namespace %q with NRI", d.GetName())
}
type domainTable struct {

View File

@@ -23,7 +23,6 @@ import (
"sync"
"github.com/containerd/containerd/log"
"github.com/sirupsen/logrus"
"github.com/containerd/containerd/version"
nri "github.com/containerd/nri/pkg/adaptation"
@@ -110,7 +109,7 @@ func New(cfg *Config) (API, error) {
}
if cfg.Disable {
logrus.Info("NRI interface is disabled by configuration.")
log.L.Info("NRI interface is disabled by configuration.")
return l, nil
}
@@ -132,7 +131,7 @@ func New(cfg *Config) (API, error) {
l.state = make(map[string]State)
logrus.Info("created NRI interface")
log.L.Info("created NRI interface")
return l, nil
}