diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php index 52ee98d4dc47..16ac8caf4dd8 100644 --- a/CRM/Core/Error.php +++ b/CRM/Core/Error.php @@ -617,7 +617,7 @@ public static function debug_log_message($message, $out = FALSE, $prefix = '', $ if (!empty(\Civi::$statics[__CLASS__]['userFrameworkLogging'])) { // should call $config->userSystem->logger($message) here - but I got a situation where userSystem was not an object - not sure why if ($config->userSystem->is_drupal and function_exists('watchdog')) { - watchdog('civicrm', '%message', ['%message' => $message], WATCHDOG_DEBUG); + watchdog('civicrm', '%message', ['%message' => $message], isset($priority) ? $priority : WATCHDOG_DEBUG); } }