diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-09-21 14:31:24 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-09-21 14:31:24 +0000 |
commit | ac2de34d8db81049a6aeee709ea4cc79bb361d0b (patch) | |
tree | b57be9edccec88c14b55b1818ddcb64c4e30e3a6 /client/go/cmd/clusterstate/get_node_state.go | |
parent | 5e08068fa0c7def183cf94b659e7d6fdb5ec1297 (diff) |
move tracing to its own package
Diffstat (limited to 'client/go/cmd/clusterstate/get_node_state.go')
-rw-r--r-- | client/go/cmd/clusterstate/get_node_state.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/go/cmd/clusterstate/get_node_state.go b/client/go/cmd/clusterstate/get_node_state.go index 3b48d362398..24472042ea8 100644 --- a/client/go/cmd/clusterstate/get_node_state.go +++ b/client/go/cmd/clusterstate/get_node_state.go @@ -13,6 +13,7 @@ import ( "github.com/fatih/color" "github.com/spf13/cobra" "github.com/vespa-engine/vespa/client/go/build" + "github.com/vespa-engine/vespa/client/go/trace" ) const ( @@ -54,12 +55,12 @@ func NewGetNodeStateCmd() *cobra.Command { func runGetNodeState(opts *Options) { if opts.Silent { - currentOutputLevel = levelNone + trace.Silent() } if opts.NoColors || os.Getenv("TERM") == "" { color.NoColor = true } - PutInfo(header) + trace.Info(header) m := detectModel(opts) sss := m.findSelectedServices(opts) clusters := make(map[string]*ClusterState) @@ -70,7 +71,7 @@ func runGetNodeState(opts *Options) { clusters[s.cluster] = state } if state == nil { - PutWarning("no state for cluster: ", s.cluster) + trace.Warning("no state for cluster: ", s.cluster) continue } if nodes, ok := state.Service[s.serviceType]; ok { @@ -83,7 +84,7 @@ func runGetNodeState(opts *Options) { } } } else { - PutWarning("no nodes for service type: ", s.serviceType) + trace.Warning("no nodes for service type: ", s.serviceType) continue } |