mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Fix: suppress klog logs output for vela top
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
@@ -19,7 +19,10 @@ package cli
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/spf13/cobra"
|
||||
"k8s.io/klog/v2"
|
||||
"sigs.k8s.io/controller-runtime/pkg/log"
|
||||
|
||||
"github.com/oam-dev/kubevela/apis/types"
|
||||
"github.com/oam-dev/kubevela/pkg/utils/common"
|
||||
@@ -50,6 +53,7 @@ func NewTopCommand(c common.Args, order string, ioStreams cmdutil.IOStreams) *co
|
||||
if AllNamespace {
|
||||
namespace = ""
|
||||
}
|
||||
klog.SetLogger(logr.New(log.NullLogSink{}))
|
||||
return launchUI(c, namespace)
|
||||
},
|
||||
Annotations: map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user