Skip to content

Commit

Permalink
enable debug logs for vpc (#640)
Browse files Browse the repository at this point in the history
Signed-off-by: Prajyot-Parab <[email protected]>
  • Loading branch information
Prajyot-Parab authored Apr 27, 2022
1 parent e08a051 commit ebe18bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cloud/scope/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions cloud/scope/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ebe18bd

Please sign in to comment.