Skip to content

Commit

Permalink
Merge pull request #287 from borod108/bugs/loglevel
Browse files Browse the repository at this point in the history
Change default log level to be less verbose
  • Loading branch information
kubevirt-bot authored Jan 25, 2022
2 parents bbbc02c + aa67672 commit ec140d3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions controllers/ssp_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (r *sspReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ct
}
sspRequest.Logger.V(1).Info("CR status updated")

sspRequest.Logger.V(1).Info("Reconciling operands...")
sspRequest.Logger.Info("Reconciling operands...")
reconcileResults, err := r.reconcileOperands(sspRequest)
if err != nil {
return handleError(sspRequest, err)
Expand All @@ -197,7 +197,7 @@ func (r *sspReconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ct
if err != nil {
return ctrl.Result{}, err
}
sspRequest.Logger.V(1).Info("CR status updated")
sspRequest.Logger.Info("CR status updated")

if sspRequest.Instance.Status.Phase == lifecycleapi.PhaseDeployed {
common.SSPOperatorReconcilingProperly.Set(1)
Expand Down Expand Up @@ -412,7 +412,7 @@ func (r *sspReconciler) reconcileOperands(sspRequest *common.Request) ([]common.
sspRequest.Logger.V(1).Info(fmt.Sprintf("Reconciling operand: %s", operand.Name()))
reconcileResults, err := operand.Reconcile(sspRequest)
if err != nil {
sspRequest.Logger.V(1).Info(fmt.Sprintf("Operand reconciliation failed: %s", err.Error()))
sspRequest.Logger.Info(fmt.Sprintf("Operand reconciliation failed: %s", err.Error()))
return nil, err
}
allReconcileResults = append(allReconcileResults, reconcileResults...)
Expand Down
2 changes: 1 addition & 1 deletion internal/common/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (r *reconcileBuilder) Reconcile() (ReconcileResult, error) {

res, err := r.createOrUpdateWithImmutableSpec(found, mutateFn)
if err != nil {
r.request.Logger.V(1).Info(fmt.Sprintf("Resource create/update failed: %v", err))
r.request.Logger.Info(fmt.Sprintf("Resource create/update failed: %v", err))
return ReconcileResult{}, err
}
if res == OperationResultDeleted || !found.GetDeletionTimestamp().IsZero() {
Expand Down
2 changes: 1 addition & 1 deletion internal/operands/common-templates/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (c *commonTemplates) Reconcile(request *common.Request) ([]common.Reconcile
upgradingNow := isUpgradingNow(request)
for _, r := range reconcileTemplatesResults {
if !upgradingNow && (r.OperationResult == common.OperationResultUpdated) {
request.Logger.V(1).Info(fmt.Sprintf("Changes reverted in common template: %s", r.Resource.GetName()))
request.Logger.Info(fmt.Sprintf("Changes reverted in common template: %s", r.Resource.GetName()))
CommonTemplatesRestored.Inc()
}
}
Expand Down
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ func main() {
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
opts := zap.Options{
Development: true,
}
opts := zap.Options{}
opts.BindFlags(flag.CommandLine)
flag.Parse()

Expand Down

0 comments on commit ec140d3

Please sign in to comment.