diff --git a/pkg/manager/manager.go b/pkg/manager/manager.go index c7b55540e..68e9fa7ff 100644 --- a/pkg/manager/manager.go +++ b/pkg/manager/manager.go @@ -27,6 +27,8 @@ type ManagerOptions struct { Baground bool } +var logLevel uint = 9 + func UpStack(targetStack Stack, opts ...ManagerOptions) (auto.UpResult, error) { return UpStackTargets(targetStack, nil, opts...) } @@ -38,11 +40,14 @@ func UpStackTargets(targetStack Stack, targetURNs []string, opts ...ManagerOptio // TODO add when loglevel debug control in place w := logging.GetWritter() defer w.Close() - var logLevel uint = 10 mOpts := []optup.Option{ optup.ProgressStreams(w), optup.DebugLogging( - debug.LoggingOptions{LogLevel: &logLevel}), + debug.LoggingOptions{ + LogLevel: &logLevel, + Debug: true, + FlowToPlugins: true, + LogToStdErr: true}), } if len(targetURNs) > 0 { mOpts = append(mOpts, optup.Target(targetURNs)) @@ -64,8 +69,16 @@ func DestroyStack(targetStack Stack, opts ...ManagerOptions) (err error) { objectStack := getStack(ctx, targetStack) w := logging.GetWritter() defer w.Close() - stdoutStreamer := optdestroy.ProgressStreams(w) - if _, err := objectStack.Destroy(ctx, stdoutStreamer); err != nil { + // stdoutStreamer := optdestroy.ProgressStreams(w) + mOpts := []optdestroy.Option{ + optdestroy.ProgressStreams(w), + optdestroy.DebugLogging( + debug.LoggingOptions{ + LogLevel: &logLevel, + FlowToPlugins: true, + LogToStdErr: true}), + } + if _, err := objectStack.Destroy(ctx, mOpts...); err != nil { logging.Error(err) os.Exit(1) }