CRM-15929 - Drupal watchdog
authorTim Otten <totten@civicrm.org>
Mon, 2 Mar 2015 23:31:54 +0000 (15:31 -0800)
committerTim Otten <totten@civicrm.org>
Mon, 2 Mar 2015 23:31:54 +0000 (15:31 -0800)
CRM/Core/Error.php
CRM/Utils/System/DrupalBase.php

index e3cb5a4d7bb711185d96135fb9e1ccdb87afc69b..652d55832af0e49ff03acb8ca6c00458fbaed634 100644 (file)
@@ -593,7 +593,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
     if ($config->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, NULL, WATCHDOG_DEBUG);
+        watchdog('civicrm', '%message', array('%message' => $message), WATCHDOG_DEBUG);
       }
     }
 
index 0e63845ee1ebf74756c6d9b4ec968cc15810cb14..a881144a69ec84bb3233467d7f92b759a8d1338e 100644 (file)
@@ -280,7 +280,7 @@ abstract class CRM_Utils_System_DrupalBase extends CRM_Utils_System_Base {
    */
   function logger($message) {
     if (CRM_Core_Config::singleton()->userFrameworkLogging) {
-      watchdog('civicrm', $message, NULL, WATCHDOG_DEBUG);
+      watchdog('civicrm', '%message', array('%message' => $message), NULL, WATCHDOG_DEBUG);
     }
   }