diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 04f7e8cd39fa..ee418c306b8b 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -586,6 +586,9 @@ public static function debug_log_message($message, $out = FALSE, $prefix = '', $ if ($config->userSystem->is_drupal and function_exists('watchdog')) { watchdog('civicrm', '%message', ['%message' => $message], $priority ?? WATCHDOG_DEBUG); } + elseif ($config->userSystem->is_drupal and CIVICRM_UF == 'Drupal8') { + \Drupal::logger('civicrm')->log($priority ?? \Drupal\Core\Logger\RfcLogLevel::DEBUG, '%message', ['%message' => $message]); + } } return $str;