diff --git a/cloud/scope/cluster.go b/cloud/scope/cluster.go index 32a78ed1a..db4483dd5 100644 --- a/cloud/scope/cluster.go +++ b/cloud/scope/cluster.go @@ -76,6 +76,10 @@ func NewClusterScope(params ClusterScopeParams, authenticator core.Authenticator return nil, errors.Wrap(vpcErr, "failed to create IBM VPC session") } + if params.Logger.V(DEBUGLEVEL).Enabled() { + core.SetLoggingLevel(core.LevelDebug) + } + return &ClusterScope{ Logger: params.Logger, client: params.Client, diff --git a/cloud/scope/machine.go b/cloud/scope/machine.go index 11c23eeaf..61fb06c31 100644 --- a/cloud/scope/machine.go +++ b/cloud/scope/machine.go @@ -82,6 +82,10 @@ func NewMachineScope(params MachineScopeParams, authenticator core.Authenticator return nil, errors.Wrap(vpcErr, "failed to create IBM VPC session") } + if params.Logger.V(DEBUGLEVEL).Enabled() { + core.SetLoggingLevel(core.LevelDebug) + } + return &MachineScope{ Logger: params.Logger, client: params.Client,