Skip to content

Commit

Permalink
Merge pull request #43 from gobackup/dev
Browse files Browse the repository at this point in the history
Add logger
  • Loading branch information
payamQorbanpour authored Oct 15, 2024
2 parents 4d73e50 + afbd067 commit 15a8289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/controller/backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type BackupReconciler struct {
// +kubebuilder:rbac:groups=gobackup.gobackup.io,resources=backups/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=gobackup.gobackup.io,resources=backups/finalizers,verbs=update
func (r *BackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
_ = log.FromContext(ctx)
logger := log.FromContext(ctx)

// Define a Backup object
backup := &backupv1.Backup{}
Expand Down Expand Up @@ -83,7 +83,7 @@ func (r *BackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
_, err = r.K8s.GetCRD(ctx, apiversionSplited[0], apiversionSplited[1], "backupmodels", backup.Namespace, backup.BackupModelRef.Name)
if err != nil {
if errors.IsNotFound(err) {
log.Log.Error(err, "BackupModel not found")
logger.Error(err, "backup > GetCRD")
return ctrl.Result{}, nil
}

Expand Down

0 comments on commit 15a8289

Please sign in to comment.