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
This commit is contained in:
Kostiantyn Kalynovskyi 2020-09-22 09:38:56 -05:00
parent 27e0ab455c
commit 7aec434452

View File

@ -60,7 +60,7 @@ func NewRootCommand(out io.Writer) (*cobra.Command, *RootOptions) {
SilenceErrors: true, SilenceErrors: true,
SilenceUsage: true, SilenceUsage: true,
PersistentPreRun: func(cmd *cobra.Command, args []string) { PersistentPreRun: func(cmd *cobra.Command, args []string) {
log.Init(options.Debug, cmd.OutOrStdout()) log.Init(options.Debug, cmd.ErrOrStderr())
}, },
} }
rootCmd.SetOut(out) rootCmd.SetOut(out)