? watchdog.patch
Index: apachesolr.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.admin.inc,v
retrieving revision 1.1.2.28.2.19
diff -u -p -r1.1.2.28.2.19 apachesolr.admin.inc
--- apachesolr.admin.inc	22 Dec 2009 11:56:55 -0000	1.1.2.28.2.19
+++ apachesolr.admin.inc	26 Dec 2009 12:46:51 -0000
@@ -132,7 +132,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();
   }
@@ -150,7 +150,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) : '';
@@ -180,7 +180,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();
   }
@@ -201,7 +201,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();
     }
   }
@@ -459,7 +459,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);
   }
 }
 
@@ -772,7 +772,7 @@ function apachesolr_batch_reindex_proces
       }
     }
     catch (Exception $e) {
-      watchdog('Apache Solr', $e->getMessage(), NULL, WATCHDOG_ERROR);
+      watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
       return FALSE;
     }
 
Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.6.2.14
diff -u -p -r1.1.2.6.2.14 apachesolr.index.inc
--- apachesolr.index.inc	26 Dec 2009 12:05:20 -0000	1.1.2.6.2.14
+++ apachesolr.index.inc	26 Dec 2009 12:46:51 -0000
@@ -272,7 +272,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;
@@ -294,7 +294,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;
@@ -324,7 +324,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;
   }
 }
@@ -348,7 +348,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.18.2.10
diff -u -p -r1.1.4.18.2.10 apachesolr.install
--- apachesolr.install	24 Nov 2009 16:21:50 -0000	1.1.4.18.2.10
+++ apachesolr.install	26 Dec 2009 12:46:51 -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.155.2.51
diff -u -p -r1.1.2.12.2.155.2.51 apachesolr.module
--- apachesolr.module	26 Dec 2009 11:57:09 -0000	1.1.2.12.2.155.2.51
+++ apachesolr.module	26 Dec 2009 12:46:51 -0000
@@ -349,7 +349,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');
@@ -377,7 +377,7 @@ 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;
     }
   }
@@ -389,7 +389,7 @@ function apachesolr_index_nodes($rows, $
 
   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) {
@@ -405,7 +405,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;
     }
@@ -441,7 +441,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;
@@ -514,7 +514,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);
   }
 }
 
@@ -581,7 +581,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);
   }
 }
 
@@ -1337,7 +1337,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;
     }
   }
@@ -1366,7 +1366,7 @@ function apachesolr_server_status($host 
     $ping = @$solr->ping(variable_get('apachesolr_ping_timeout', 4));
   }
   catch (Exception $e) {
-    watchdog('Apache Solr', check_plain($e->getMessage()), NULL, WATCHDOG_ERROR);
+    watchdog('apachesolr', '!e', array('!e' => nl2br(check_plain($e->getMessage()))), WATCHDOG_ERROR);
   }
   return $ping;
 }
@@ -1414,7 +1414,7 @@ function apachesolr_drupal_query($keys =
     $query = new $class($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;
   }
 
@@ -1748,7 +1748,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.20.2.2
diff -u -p -r1.1.2.20.2.2 apachesolr_search.admin.inc
--- apachesolr_search.admin.inc	13 Aug 2009 12:16:49 -0000	1.1.2.20.2.2
+++ apachesolr_search.admin.inc	26 Dec 2009 12:46:52 -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.111.2.41
diff -u -p -r1.1.2.6.2.111.2.41 apachesolr_search.module
--- apachesolr_search.module	26 Dec 2009 12:05:20 -0000	1.1.2.6.2.111.2.41
+++ apachesolr_search.module	26 Dec 2009 12:46:52 -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;
@@ -1238,7 +1238,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);
   }
 }
 
