Change varbase:entity-update command to show errors instead of logging them only

Created on 3 April 2024, 8 months ago

Problem/Motivation

varbase:entity-update command should show error instead of logging it

Steps to reproduce

Run drush varbase:entity-update

Proposed resolution

diff --git a/docroot/modules/contrib/varbase_core/src/Drush/Commands/VarbaseCoreCommands.php b/docroot/modules/contrib/varbase_core/src/Drush/Commands/VarbaseCoreCommands.php
index 6946b55d3..e6a75d8e8 100644
--- a/docroot/modules/contrib/varbase_core/src/Drush/Commands/VarbaseCoreCommands.php
+++ b/docroot/modules/contrib/varbase_core/src/Drush/Commands/VarbaseCoreCommands.php
@@ -63,10 +63,10 @@ public function applyUpdatesWithEntityDefinitionUpdateManager() {
       $this->logger()->success(dt('Applied Entity updates for mismatched entity and/or field definitions'));
     }
     catch (\Exception $e) {
-      \Drupal::logger('Varbase')->critical('Error while drush varbase:entity-update. !code !exception', [
+      $this->logger()->error(dt('Error while drush varbase:entity-update. !code !exception', [
         '!code' => $e->getCode(),
         '!exception' => $e->getMessage(),
-      ]);
+      ]));
     }
   }
Feature request
Status

Needs review

Version

9.1

Component

Code

Created by

🇹🇷Turkey emircan erkul Turkey

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024