? watchdog.patch
Index: apachesolr.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.admin.inc,v
retrieving revision 1.1.2.42
diff -u -p -r1.1.2.42 apachesolr.admin.inc
--- apachesolr.admin.inc	21 Dec 2009 17:15:40 -0000	1.1.2.42
+++ apachesolr.admin.inc	26 Dec 2009 12:51:54 -0000
@@ -124,7 +124,7 @@ function apachesolr_index_page() {
     $data = $solr->getLuke();
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     drupal_set_message(nl2br(check_plain($e->getMessage())), "warning");
     $data->fields = array();
   }
@@ -142,7 +142,7 @@ function apachesolr_index_page() {
       $delete_msg = '<p>' . t('Number of pending deletions: @deletes_total', $stats_summary) . "</p>\n";
     }
     catch (Exception $e) {
-      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+      watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     }
     $output .= $solr_msg . $delay_msg;
     $pending_msg = $stats_summary['@pending_docs'] ? t('(@pending_docs sent but not yet processed)', $stats_summary) : '';
@@ -172,7 +172,7 @@ function apachesolr_index_report() {
     $data = $solr->getLuke();
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     drupal_set_message(nl2br(check_plain($e->getMessage())), "warning");
     $data->fields = array();
   }
@@ -193,7 +193,7 @@ function apachesolr_index_report() {
       $output .= '<p>' . t('Number of terms in index: @num', array('@num' => $data->index->numTerms)) . "</p>\n";
     }
     catch (Exception $e) {
-      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+      watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
       $data->fields = array();
     }
   }
@@ -422,7 +422,7 @@ function apachesolr_delete_index_confirm
 
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
 }           
 
Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.20
diff -u -p -r1.1.2.20 apachesolr.index.inc
--- apachesolr.index.inc	24 Dec 2009 03:41:29 -0000	1.1.2.20
+++ apachesolr.index.inc	26 Dec 2009 12:51:54 -0000
@@ -264,7 +264,7 @@ function apachesolr_cron_check_node_tabl
     $node_lists[] = $nodes;
   }
   foreach ($node_lists as $nodes) {
-    watchdog('Apache Solr', 'On cron running apachesolr_nodeapi_mass_update() on nids @nids', array('@nids' => implode(',', array_keys($nodes))), WATCHDOG_WARNING);
+    watchdog('apachesolr', 'On cron running apachesolr_nodeapi_mass_update() on nids @nids', array('@nids' => implode(',', array_keys($nodes))), WATCHDOG_WARNING);
     if (!apachesolr_nodeapi_mass_update($nodes)) {
       // Solr query failed - so stop trying.
       break;
@@ -286,7 +286,7 @@ function apachesolr_cron_check_node_tabl
     $node_lists[] = $nodes;
   }
   foreach ($node_lists as $nodes) {
-    watchdog('Apache Solr', 'On cron running apachesolr_nodeapi_mass_delete() on nids @nids', array('@nids' => implode(',', array_keys($nodes))), WATCHDOG_WARNING);
+    watchdog('apachesolr', 'On cron running apachesolr_nodeapi_mass_delete() on nids @nids', array('@nids' => implode(',', array_keys($nodes))), WATCHDOG_WARNING);
     if (!apachesolr_nodeapi_mass_delete($nodes)) {
       // Solr query failed - so stop trying.
       break;
@@ -316,7 +316,7 @@ function apachesolr_nodeapi_mass_update(
     return TRUE;
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     return FALSE;
   }
 }
@@ -340,7 +340,7 @@ function apachesolr_nodeapi_mass_delete(
     return TRUE;
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     return FALSE;
   }
 }
Index: apachesolr.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.install,v
retrieving revision 1.1.4.28
diff -u -p -r1.1.4.28 apachesolr.install
--- apachesolr.install	24 Nov 2009 16:20:41 -0000	1.1.4.28
+++ apachesolr.install	26 Dec 2009 12:51:54 -0000
@@ -28,7 +28,7 @@ function apachesolr_requirements($phase)
       }
     }
     catch (Exception $e) {
-      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+	  watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     }
     $value =  $ping ? $t('Your site has contacted the Apache Solr server.') : $t('Your site was unable to contact the Apache Solr server.');
     $severity = $ping ? REQUIREMENT_OK : REQUIREMENT_ERROR;
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.179
diff -u -p -r1.1.2.12.2.179 apachesolr.module
--- apachesolr.module	24 Dec 2009 05:10:29 -0000	1.1.2.12.2.179
+++ apachesolr.module	26 Dec 2009 12:51:55 -0000
@@ -336,7 +336,7 @@ function apachesolr_index_nodes($rows, $
     }
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     return FALSE;
   }
   include_once(drupal_get_path('module', 'apachesolr') .'/apachesolr.index.inc');
@@ -353,14 +353,14 @@ function apachesolr_index_nodes($rows, $
     }
     catch (Exception $e) {
       // Something bad happened - don't continue.
-      watchdog('Apache Solr', 'Error constructing documents to index: <br /> !message', array('!message' => nl2br(strip_tags($e->getMessage()))), WATCHDOG_ERROR);
+      watchdog('apachesolr', 'Error constructing documents to index: <br /> !message', array('!message' => nl2br(strip_tags($e->getMessage()))), WATCHDOG_ERROR);
       break;
     }
   }
 
   if (count($documents)) {
     try {
-      watchdog('Apache Solr', 'Adding @count documents.', array('@count' => count($documents)));
+      watchdog('apachesolr', 'Adding @count documents.', array('@count' => count($documents)));
       // Chunk the adds by 20s
       $docs_chunk = array_chunk($documents, 20);
       foreach ($docs_chunk as $docs) {
@@ -376,7 +376,7 @@ function apachesolr_index_nodes($rows, $
           $nids[] = $doc->nid;
         }
       }
-      watchdog('Apache Solr', 'Indexing failed on one of the following nodes: @nids <br /> !message',
+      watchdog('apachesolr', 'Indexing failed on one of the following nodes: @nids <br /> !message',
                array('@nids' => implode(', ', $nids), '!message' => nl2br(strip_tags($e->getMessage()))), WATCHDOG_ERROR);
       return FALSE;
     }
@@ -412,7 +412,7 @@ function apachesolr_delete_node_from_ind
     return TRUE;
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     // Don't keep trying queries if they are failing.
     $failed = TRUE;
     return FALSE;
@@ -468,7 +468,7 @@ function apachesolr_cron() {
     }
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())) . ' in apachesolr_cron', NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
 }
 
@@ -535,7 +535,7 @@ function apachesolr_set_stats_message($t
     drupal_set_message(t($text, $stats_summary), $type, FALSE);
   }
   catch (Exception $e) {
-    watchdog('apachesolr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
 }
 
@@ -1138,7 +1138,7 @@ function apachesolr_get_solr($host = NUL
       $solr_cache[$host][$port][$path] = new $class($host, $port, $path);
     }
     catch (Exception $e) {
-      watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+      watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
       return;
     }
   }
@@ -1182,7 +1182,7 @@ function apachesolr_drupal_query($keys =
     $query = new $class(apachesolr_get_solr(), $keys, $filters, $solrsort, $base_path);
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     $query = NULL;
   }
 
@@ -1387,7 +1387,7 @@ function apachesolr_mlt_suggestions($set
     }
   }
   catch ( Exception $e ) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR );
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
 }
 
Index: apachesolr_search.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.admin.inc,v
retrieving revision 1.1.2.21
diff -u -p -r1.1.2.21 apachesolr_search.admin.inc
--- apachesolr_search.admin.inc	29 Jul 2009 18:27:48 -0000	1.1.2.21
+++ apachesolr_search.admin.inc	26 Dec 2009 12:51:55 -0000
@@ -17,7 +17,7 @@ function apachesolr_search_settings_page
     $output .= drupal_get_form('apachesolr_search_settings_form', $fields);
   }
   catch (Exception $e) {
-    watchdog('apachesolr', nl2br(check_plain($e->getMessage())));
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
     drupal_set_message(nl2br(check_plain($e->getMessage())), "warning");
     $output .= t('Cannot get information about the fields in the index at this time.');
   }
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.129
diff -u -p -r1.1.2.6.2.129 apachesolr_search.module
--- apachesolr_search.module	26 Dec 2009 11:45:32 -0000	1.1.2.6.2.129
+++ apachesolr_search.module	26 Dec 2009 12:51:55 -0000
@@ -130,7 +130,7 @@ function apachesolr_search_search($op = 
         return $results;
       }
       catch (Exception $e) {
-        watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+        watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
         apachesolr_failure(t('Solr search'), $keys);
       }
       break;
@@ -1053,7 +1053,7 @@ function apachesolr_search_build_spellch
     $response = $solr->search('solr', 0, 0, $params);
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
 }
 
