Skip to content

Commit

Permalink
Merge pull request #157 from k0sproject/exec-logerror
Browse files Browse the repository at this point in the history
Add exec.LogError option
  • Loading branch information
kke authored Jan 9, 2024
2 parents 1ba2125 + ad6c566 commit d1f6f84
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion exec/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,13 @@ func StreamOutput() Option {
}
}

// LogError exec option for enabling or disabling live error logging during exec
func LogError(v bool) Option {
return func(o *Options) {
o.LogError = v
}
}

// HideCommand exec option for hiding the command-string and stdin contents from the logs
func HideCommand() Option {
return func(o *Options) {
Expand Down Expand Up @@ -298,7 +305,7 @@ func Build(opts ...Option) *Options {
LogInfo: false,
LogCommand: true,
LogDebug: true,
LogError: true,
LogError: false,
LogOutput: true,
StreamOutput: false,
Sudo: false,
Expand Down

0 comments on commit d1f6f84

Please sign in to comment.