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(),
-      ]);
+      ]));
     }
   }
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

emircanerkul created an issue. See original summary.

rajab natshah’s picture

Title: varbase:entity-update command should show error instead of logging it » Change varbase:entity-update command to show errors instead of logging them
rajab natshah’s picture

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

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier changed the visibility of the branch 3437846-change-varbaseentity-update-command to hidden.

immaculatexavier’s picture

I tried to Create MR, But MR error in 9.1.x branch Committed link

immaculatexavier changed the visibility of the branch 3437846-change-varbaseentity-update-command to hidden.

immaculatexavier’s picture

Status: Active » Needs review

Created MR for the Proposed resolution. Kindly review.

rajab natshah’s picture

Status: Needs review » Closed (won't fix)