mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 03:25:36 +02:00
Use logger for helm output (#1585)
* use logger for helm output Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> * update integration test output Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> * make logging output configurable Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> * also compare stderr in integration tests Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --------- Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
+7
-1
@@ -60,7 +60,13 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) {
|
||||
case globalConfig.Quiet:
|
||||
logLevel = "warn"
|
||||
}
|
||||
logger = helmexec.NewLogger(os.Stderr, logLevel)
|
||||
|
||||
// If the log output is not set, default to stderr.
|
||||
logOut := globalConfig.LogOutput
|
||||
if logOut == nil {
|
||||
logOut = os.Stderr
|
||||
}
|
||||
logger = helmexec.NewLogger(logOut, logLevel)
|
||||
globalConfig.SetLogger(logger)
|
||||
return nil
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user