From 15de292f0c2e120a32dcc1ac0fc8f87b602c3926 Mon Sep 17 00:00:00 2001 From: Yoshiaki Kawazu Date: Fri, 22 Nov 2019 14:57:48 +0900 Subject: [PATCH] Fix spinner output to stderr --- cloudwatch/cloudwatch.go | 1 + cloudwatch/group.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cloudwatch/cloudwatch.go b/cloudwatch/cloudwatch.go index b2f6532..0fa6e7b 100644 --- a/cloudwatch/cloudwatch.go +++ b/cloudwatch/cloudwatch.go @@ -93,6 +93,7 @@ func (cwl *Client) Tail(ctx context.Context) error { } s := spinner.New(spinner.CharSets[14], 100*time.Millisecond) + s.Writer = os.Stderr s.Start() s.Suffix = " Fetching log streams..." diff --git a/cloudwatch/group.go b/cloudwatch/group.go index 4a3a837..db92058 100644 --- a/cloudwatch/group.go +++ b/cloudwatch/group.go @@ -1,6 +1,7 @@ package cloudwatch import ( + "os" "time" "github.com/aws/aws-sdk-go/service/cloudwatchlogs" @@ -11,6 +12,7 @@ import ( // ListGroups lists group names matching the specified filter func (cwl *Client) ListGroups() (groupNames []string, err error) { s := spinner.New(spinner.CharSets[14], 100*time.Millisecond) + s.Writer = os.Stderr s.Start() s.Suffix = " Fetching log groups..." defer s.Stop()