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

@@ -37,9 +37,9 @@ import (
"github.com/containerd/containerd/cmd/ctr/commands/tasks"
versionCmd "github.com/containerd/containerd/cmd/ctr/commands/version"
"github.com/containerd/containerd/defaults"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/version"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"google.golang.org/grpc/grpclog"
)
@@ -121,7 +121,7 @@ containerd CLI
}, extraCmds...)
app.Before = func(context *cli.Context) error {
if context.GlobalBool("debug") {
logrus.SetLevel(logrus.DebugLevel)
return log.SetLevel("debug")
}
return nil
}

View File

@@ -25,7 +25,6 @@ import (
"github.com/containerd/containerd/content"
"github.com/containerd/containerd/leases"
"github.com/containerd/containerd/log"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@@ -66,7 +65,7 @@ var pruneReferencesCommand = cli.Command{
dryRun := clicontext.Bool("dry")
if dryRun {
log.G(ctx).Logger.SetLevel(logrus.DebugLevel)
log.G(ctx).Logger.SetLevel(log.DebugLevel)
log.G(ctx).Debug("dry run, no changes will be applied")
}