diff --git a/go.mod b/go.mod index cab7c030a6d8..c23454d51ada 100644 --- a/go.mod +++ b/go.mod @@ -106,7 +106,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 github.com/xlab/treeprint v1.2.0 go.etcd.io/bbolt v1.3.9 - go.uber.org/zap v1.27.0 + go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa golang.org/x/mod v0.15.0 golang.org/x/net v0.21.0 diff --git a/pkg/k8s/commands/run.go b/pkg/k8s/commands/run.go index 54be5362637f..82b71032af2c 100644 --- a/pkg/k8s/commands/run.go +++ b/pkg/k8s/commands/run.go @@ -39,7 +39,7 @@ func Run(ctx context.Context, args []string, opts flag.Options) error { defer func() { if errors.Is(err, context.DeadlineExceeded) { - log.Logger.Warn("Increase --timeout value") + log.WarnContext(ctx, "Increase --timeout value") } }() opts.K8sVersion = cluster.GetClusterVersion() @@ -68,7 +68,7 @@ func (r *runner) run(ctx context.Context, artifacts []*k8sArtifacts.Artifact) er } defer func() { if err := runner.Close(ctx); err != nil { - log.Logger.Errorf("failed to close runner: %s", err) + log.ErrorContext(ctx, "failed to close runner: %s", err) } }()