From 7aec4344526d96fcf963fec9e1aab6cacc6b3149 Mon Sep 17 00:00:00 2001 From: Kostiantyn Kalynovskyi Date: Tue, 22 Sep 2020 09:38:56 -0500 Subject: [PATCH] Redirect airshipctl log output to stderr This would allow us to extract information from airshipctl, and not mix it with logging messages. Change-Id: I4b22d143956909b35b9f55571d8f7ad6798df4f2 --- cmd/root.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/root.go b/cmd/root.go index 50d7be255..145a01b72 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -60,7 +60,7 @@ func NewRootCommand(out io.Writer) (*cobra.Command, *RootOptions) { SilenceErrors: true, SilenceUsage: true, PersistentPreRun: func(cmd *cobra.Command, args []string) { - log.Init(options.Debug, cmd.OutOrStdout()) + log.Init(options.Debug, cmd.ErrOrStderr()) }, } rootCmd.SetOut(out)