Skip to content

Commit

Permalink
chore: change out from stderr to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
howieyuen committed Jul 19, 2022
1 parent 13781ca commit 5a6144a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/kusionctl/cmd/compile/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func NewCmdCompile() *cobra.Command {
i18n.T("Specify the override option"))
cmd.Flags().StringSliceVarP(&o.Overrides, "overrides", "O", []string{},
i18n.T("Specify the configuration override path and value"))
cmd.Flags().BoolVarP(&o.LogToStderr, "log-to-stderr", "s", false,
i18n.T("log to standard error instead of files"))
cmd.Flags().BoolVarP(&o.LogToStdout, "log-to-stdout", "", false,
i18n.T("log to standard out instead of files"))

return cmd
}
6 changes: 3 additions & 3 deletions pkg/kusionctl/cmd/compile/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CompileOptions struct {
DisableNone bool
OverrideAST bool
Overrides []string
LogToStderr bool
LogToStdout bool
}

func NewCompileOptions() *CompileOptions {
Expand All @@ -34,8 +34,8 @@ func NewCompileOptions() *CompileOptions {
func (o *CompileOptions) Complete(args []string) {
o.Filenames = args
o.PreSet(projectstack.IsStack)
if o.LogToStderr {
log.SetOutput(os.Stderr)
if o.LogToStdout {
log.SetOutput(os.Stdout)
}
}

Expand Down

0 comments on commit 5a6144a

Please sign in to comment.