Revert "CRM-14850 update use of ufLogging to not call ->is_drupal"
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 23 Jun 2014 00:55:56 +0000 (12:55 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Mon, 23 Jun 2014 00:55:56 +0000 (12:55 +1200)
This reverts commit ac056893bd4a6816bc6c8b262cd0f30f87c5cad3.

CRM/Core/Error.php

index 87b60d3756ba522f625a1724c5d36e97ca3da394..f11d4ba618854b1c090c83970df440c5284c2283 100644 (file)
@@ -580,6 +580,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
    * @static
    */
   static function debug_log_message($message, $out = FALSE, $comp = '') {
+    $config = CRM_Core_Config::singleton();
 
     $file_log = self::createDebugLogger($comp);
     $file_log->log("$message\n");
@@ -589,7 +590,11 @@ class CRM_Core_Error extends PEAR_ErrorStack {
     }
     $file_log->close();
 
-    if (CRM_Core_Config::singleton()->userSystem->logger($message));
+    if ($config->userFrameworkLogging) {
+      if ($config->userSystem->is_drupal and function_exists('watchdog')) {
+        watchdog('civicrm', $message, NULL, WATCHDOG_DEBUG);
+      }
+    }
 
     return $str;
   }