Skip to content

Commit

Permalink
Merge pull request #18115 from sunilpawar/dev_1943
Browse files Browse the repository at this point in the history
dev/core#1943 add functionality to add civicrm log into Drupal access log
  • Loading branch information
seamuslee001 authored Aug 10, 2020
2 parents b293471 + 75f0849 commit 677cebc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CRM/Core/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 677cebc

Please sign in to comment.