From 1511d7f0d6c468caa965384dda51defc5768ed56 Mon Sep 17 00:00:00 2001 From: Andrey Baklanov Date: Thu, 6 Feb 2025 16:04:34 +0200 Subject: [PATCH] Event_Dispatcher null more logger --- .../custom/asu_application/src/Form/ApplicationForm.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/modules/custom/asu_application/src/Form/ApplicationForm.php b/public/modules/custom/asu_application/src/Form/ApplicationForm.php index 117b7404b..9c9f5a617 100644 --- a/public/modules/custom/asu_application/src/Form/ApplicationForm.php +++ b/public/modules/custom/asu_application/src/Form/ApplicationForm.php @@ -92,11 +92,11 @@ public static function create(ContainerInterface $container) { $instance->eventDispatcher = $container->get('event_dispatcher'); if (!$instance->eventDispatcher) { - \Drupal::logger('asu_application')->error('ApplicationForm::create() - eventDispatcher is NULL for user_id={user}', [ - 'user' => \Drupal::currentUser()->id(), - ]); + $this->logger('asu_application')->critical('ApplicationForm::create() - eventDispatcher is NULL :'); + $this->logger('asu_application')->critical('user_id={user} ' . currentUser()->id()); + $this->logger('asu_application')->critical('Set eventDispatcher ' . \Drupal::service('event_dispatcher')); $instance->eventDispatcher = \Drupal::service('event_dispatcher'); - } + } return $instance; }