dev/core#1943 add functionality to add civicrm log into Drupal access log
authorSunil Pawar <sunil@skvare.com>
Mon, 10 Aug 2020 12:09:22 +0000 (17:39 +0530)
committerSunil Pawar <sunil@skvare.com>
Mon, 10 Aug 2020 12:09:22 +0000 (17:39 +0530)
CRM/Core/Error.php

index 04f7e8cd39fadc2d311ac8824c73b51340ca4034..215e336426c96a297eec194851104f5b41690701 100644 (file)
@@ -586,6 +586,9 @@ class CRM_Core_Error extends PEAR_ErrorStack {
       if ($config->userSystem->is_drupal and function_exists('watchdog')) {
         watchdog('civicrm', '%message', ['%message' => $message], $priority ?? WATCHDOG_DEBUG);
       }
+      else if ($config->userSystem->is_drupal and CIVICRM_UF == 'Drupal8') {
+        \Drupal::logger('civicrm')->debug($message);
+      }
     }
 
     return $str;