? boost-559408.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.116
diff -u -p -r1.3.2.2.2.5.2.116 boost.module
--- boost.module	30 Aug 2009 01:16:27 -0000	1.3.2.2.2.5.2.116
+++ boost.module	30 Aug 2009 01:25:00 -0000
@@ -2201,7 +2201,9 @@ function boost_crawler_run() {
 
     // Wait 10 seconds if first run and try again (let cron finish).
     if (variable_get('cron_semaphore', FALSE) == TRUE) {
-      watchdog('boost', 'Crawler Sleep');
+      if (BOOST_VERBOSE >= 5) {
+        watchdog('boost', 'Crawler Sleep');
+      }
       sleep(10);
       boost_async_call_crawler($self, $this_thread, $total_threads);
       exit;
@@ -2222,7 +2224,9 @@ function boost_crawler_run() {
             boost_async_call_crawler($self, $threads, variable_get('boost_crawler_number_of_threads', $threads));
             $threads--;
           }
-          watchdog('boost', 'All @num threads started', array('@num' => variable_get('boost_crawler_number_of_threads', $threads)));
+          if (BOOST_VERBOSE >= 5) {
+            watchdog('boost', 'All @num threads started', array('@num' => variable_get('boost_crawler_number_of_threads', $threads)));
+          }
           variable_set('boost_crawler_start_time', BOOST_TIME);
           exit;
         }
@@ -2235,7 +2239,9 @@ function boost_crawler_run() {
           $threads = _boost_variable_get('boost_crawler_number_of_threads');
           _boost_variable_set('boost_crawler_number_of_threads', $threads-1);
           db_unlock_tables();
-          watchdog('boost', 'Crawler - Thread %num of %total Stopped.', array('%num' => $this_thread, '%total' => $total_threads));
+          if (BOOST_VERBOSE >= 5) {
+            watchdog('boost', 'Crawler - Thread %num of %total Stopped.', array('%num' => $this_thread, '%total' => $total_threads));
+          }
           exit;
         }
 
@@ -2262,14 +2268,18 @@ function boost_crawler_run() {
           $threads = _boost_variable_get('boost_crawler_number_of_threads');
           _boost_variable_set('boost_crawler_number_of_threads', $threads-1);
           db_unlock_tables();
-          watchdog('boost', 'Crawler - Thread %num of %total Done.', array('%num' => $this_thread, '%total' => $total_threads));
+          if (BOOST_VERBOSE >= 5) {
+            watchdog('boost', 'Crawler - Thread %num of %total Done.', array('%num' => $this_thread, '%total' => $total_threads));
+          }
           // Re init crawler if it missed some, try 5 times
           if (   _boost_variable_get('boost_crawler_number_of_threads') == 0
               && _boost_variable_get('boost_crawler_number_of_tries') < 5
               && boost_crawler_verify()
               ) {
             _boost_variable_set('boost_crawler_number_of_threads', 1);
-            watchdog('boost', 'Crawler - Restarting with 1 thread, to try & get the stubborn urls cached.');
+            if (BOOST_VERBOSE >= 5) {
+              watchdog('boost', 'Crawler - Restarting with 1 thread, to try & get the stubborn urls cached.');
+            }
             boost_async_call_crawler($self, 1, 1);
             exit;
           }
@@ -2296,12 +2306,16 @@ function boost_crawler_run() {
     }
   }
   elseif (variable_get('boost_crawler_number_of_threads', 0) > 0) {
-    watchdog('boost', 'Crawler already running');
+    if (BOOST_VERBOSE >= 3) {
+      watchdog('boost', 'Crawler already running');
+     }
     drupal_set_message(t('Boost: Crawler is already running. Attempt to start crawler failed.'), 'warning');
   }
   elseif (variable_get('cron_semaphore', FALSE) == TRUE) {
     // This function called from cron; reset & call self.
-    watchdog('boost', 'Crawler Start ' . $self);
+    if (BOOST_VERBOSE >= 5) {
+      watchdog('boost', 'Crawler Start ' . $self);
+    }
     db_query('TRUNCATE {boost_crawler}');
     variable_set('boost_crawler_position', 0);
     variable_set('boost_crawler_loaded_count' . BOOST_FILE_EXTENSION, 0);
