This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new 2dfee3bfe fix(cli): dev mode init controller-runtime log.SetLogger()
2dfee3bfe is described below
commit 2dfee3bfe411bea3e80d227f2b36b6b36da348fe
Author: Gaelle Fournier <[email protected]>
AuthorDate: Thu Sep 28 10:41:06 2023 +0200
fix(cli): dev mode init controller-runtime log.SetLogger()
---
pkg/cmd/run.go | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 7fd27fca3..f117f8138 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -55,8 +55,10 @@ import (
"k8s.io/apimachinery/pkg/util/yaml"
"k8s.io/cli-runtime/pkg/printers"
"k8s.io/client-go/kubernetes/scheme"
+ logf "sigs.k8s.io/controller-runtime/pkg/log"
ctrl "sigs.k8s.io/controller-runtime/pkg/client"
+ "sigs.k8s.io/controller-runtime/pkg/log/zap"
v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
"github.com/apache/camel-k/v2/pkg/client"
@@ -332,6 +334,7 @@ func (o *runCmdOptions) run(cmd *cobra.Command, args
[]string) error {
signal.Notify(cs, os.Interrupt, syscall.SIGTERM)
go func() {
<-cs
+ logf.SetLogger(zap.New(zap.UseDevMode(true)))
if o.Context.Err() != nil {
// Context canceled
return