From e48ad568b9e0ad9d3fbcecb82bf77998b19f6499 Mon Sep 17 00:00:00 2001 From: Jonathan Calvert Date: Thu, 31 Oct 2019 09:56:36 -0500 Subject: [PATCH] etcdctl: Print healthy results to stdout, not stderr Printing to stderr when there is no actual error is not intuitive and makes tool integration more difficult --- etcdctl/ctlv3/command/printer_simple.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etcdctl/ctlv3/command/printer_simple.go b/etcdctl/ctlv3/command/printer_simple.go index 409123137..4780b6972 100644 --- a/etcdctl/ctlv3/command/printer_simple.go +++ b/etcdctl/ctlv3/command/printer_simple.go @@ -150,7 +150,7 @@ func (s *simplePrinter) MemberList(resp v3.MemberListResponse) { func (s *simplePrinter) EndpointHealth(hs []epHealth) { for _, h := range hs { if h.Error == "" { - fmt.Fprintf(os.Stderr, "%s is healthy: successfully committed proposal: took = %v\n", h.Ep, h.Took) + fmt.Printf("%s is healthy: successfully committed proposal: took = %v\n", h.Ep, h.Took) } else { fmt.Fprintf(os.Stderr, "%s is unhealthy: failed to commit proposal: %v\n", h.Ep, h.Error) }