Index: CRM/Admin/Form/Setting/Debugging.php
===================================================================
--- CRM/Admin/Form/Setting/Debugging.php	(revision 793)
+++ CRM/Admin/Form/Setting/Debugging.php	(working copy)
@@ -50,7 +50,12 @@
     public function buildQuickForm( ) {
         CRM_Utils_System::setTitle(ts('Settings - Debugging'));
 
+        $config =& CRM_Core_Config::singleton( );
+
         $this->addYesNo( 'debug', ts( 'Enable Debugging' ));
+        if ($config->userFramework == 'Drupal') {
+            $this->addYesNo( 'userFrameworkLogging', ts( 'Enable CMS Logging' ));
+        }
         $this->addYesNo( 'backtrace', ts( 'Display Backtrace' ));
         $this->addElement('text','fatalErrorTemplate', ts('Fatal Error Template'));  
         $this->addElement('text','fatalErrorHandler', ts('Fatal Error Handler'));  
Index: CRM/Core/Config/Variables.php
===================================================================
--- CRM/Core/Config/Variables.php	(revision 794)
+++ CRM/Core/Config/Variables.php	(working copy)
@@ -271,6 +271,7 @@
     public $userFrameworkBaseURL        = null;
     public $userFrameworkResourceURL    = null;
     public $userFrameworkFrontend       = false;
+    public $userFrameworkLogging        = false;
 
     /**
      * the handle for import file size 
Index: CRM/Core/Error.php
===================================================================
--- CRM/Core/Error.php	(revision 793)
+++ CRM/Core/Error.php	(working copy)
@@ -381,6 +381,13 @@
             echo $str;
         }
         $file_log->close( );
+
+        if ($config->userFrameworkLogging) {
+            if ($config->userFramework == 'Drupal' and function_exists('watchdog')) {
+                watchdog('civicrm', $message, NULL, WATCHDOG_DEBUG);
+            }
+        }
+
         return $str;
     }
 
Index: templates/CRM/Admin/Form/Setting/Debugging.tpl
===================================================================
--- templates/CRM/Admin/Form/Setting/Debugging.tpl	(revision 793)
+++ templates/CRM/Admin/Form/Setting/Debugging.tpl	(working copy)
@@ -4,6 +4,10 @@
         <dl>
             <dt>{$form.debug.label}</dt><dd>{$form.debug.html}</dd>
             <dt>&nbsp;</dt><dd class="description">{ts}Set this value to <strong>Yes</strong> if you want to use one of CiviCRM's debugging tools. <strong>This feature should NOT be enabled for production sites</strong>{/ts} {help id='debug'}</dd>
+            {if $form.userFrameworkLogging}
+            <dt>{$form.userFrameworkLogging.label}</dt><dd>{$form.userFrameworkLogging.html}</dd>
+            <dt>&nbsp;</dt><dd class="description">{ts}Set this value to <strong>Yes</strong> if you want CiviCRM error/debugging messages the appear in your CMS' error log.{/ts} {help id='userFrameworkLogging'}</dd>
+            {/if}
             <dt>{$form.backtrace.label}</dt><dd>{$form.backtrace.html}</dd>
             <dt>&nbsp;</dt><dd class="description">{ts}Set this value to <strong>Yes</strong> if you want to display a backtrace listing when a fatal error is encountered. <strong>This feature should NOT be enabled for production sites</strong>{/ts}</dd>
             <dt>{$form.fatalErrorTemplate.label}</dt><dd>{$form.fatalErrorTemplate.html}</dd>
Index: templates/CRM/Admin/Form/Setting/Debugging.hlp
===================================================================
--- templates/CRM/Admin/Form/Setting/Debugging.hlp	(revision 793)
+++ templates/CRM/Admin/Form/Setting/Debugging.hlp	(working copy)
@@ -14,3 +14,7 @@
 </ul>
 </p>
 {/htxt}
+{htxt id='userFrameworkLogging'}
+<p>{ts}Set this value to <strong>Yes</strong> if you want CiviCRM error/debugging messages the appear in your CMS' error log.{/ts}</strong></p>
+<p>{ts}In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal's watchdog enabled){/ts}</p>
+{/htxt}

