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
This commit is contained in:
Jonathan Calvert 2019-10-31 09:56:36 -05:00
parent bbe1e78e62
commit e48ad568b9

View File

@ -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)
}