Index: includes/install.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/install.inc,v
retrieving revision 1.89
diff -u -r1.89 install.inc
--- includes/install.inc	9 May 2009 18:35:01 -0000	1.89
+++ includes/install.inc	11 May 2009 14:17:46 -0000
@@ -610,6 +610,7 @@
     // Uninstall the module.
     module_load_install($module);
     module_invoke($module, 'uninstall');
+    watchdog('system', '%module module uninstalled.', array('%module' => $module), WATCHDOG_INFO);
 
     // Now remove the menu links for all paths declared by this module.
     if (!empty($paths)) {
Index: includes/module.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.140
diff -u -r1.140 module.inc
--- includes/module.inc	11 Apr 2009 17:58:17 -0000	1.140
+++ includes/module.inc	11 May 2009 14:17:46 -0000
@@ -258,6 +258,7 @@
         ->execute();
       drupal_load('module', $module);
       $invoke_modules[] = $module;
+      watchdog('system', '%module module enabled.', array('%module' => $module), WATCHDOG_INFO);
     }
   }
 
@@ -309,6 +310,7 @@
         ->condition('name', $module)
         ->execute();
       $invoke_modules[] = $module;
+      watchdog('system', '%module module disabled.', array('%module' => $module), WATCHDOG_INFO);
     }
   }
 
Index: modules/system/system.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.test,v
retrieving revision 1.41
diff -u -r1.41 system.test
--- modules/system/system.test	6 May 2009 10:37:28 -0000	1.41
+++ modules/system/system.test	11 May 2009 14:17:48 -0000
@@ -52,6 +52,40 @@
       $this->assertEqual(module_exists($module), $enabled, t($message, array('@module' => $module)));
     }
   }
+
+  /**
+   * Verify a log entry was entered for a module's status change.
+   * Called in the same way of the expected original watchdog() execution.
+   *
+   * @param $type
+   *   The category to which this message belongs.
+   * @param $message
+   *   The message to store in the log. See t() for documentation
+   *   on how $message and $variables interact. Keep $message
+   *   translatable by not concatenating dynamic values into it!
+   * @param $variables
+   *   Array of variables to replace in the message on display or
+   *   NULL if message is already translated or not possible to
+   *   translate.
+   * @param $severity
+   *   The severity of the message, as per RFC 3164
+   * @param $link
+   *   A link to associate with the message.
+   */
+  function assertLogMessage($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = '') {
+    $count = db_select('watchdog', 'w')
+      ->condition(db_and()
+        ->condition('type', $type)
+        ->condition('message', $message)
+        ->condition('variables', serialize($variables))
+        ->condition('severity', $severity)
+        ->condition('link', $link)
+      )
+      ->countQuery()
+      ->execute()
+      ->fetchField();
+    $this->assertTrue($count > 0, t('watchdog table contains @count rows for @message', array('@count' => $count, '@message' => $message)));
+  }
 }
 
 /**
@@ -87,6 +121,7 @@
     $this->assertText(t('hook_modules_enabled fired for aggregator'), t('hook_modules_enabled fired.'));
     $this->assertModules(array('aggregator'), TRUE);
     $this->assertTableCount('aggregator', TRUE);
+    $this->assertLogMessage('system', "%module module enabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
 
     // Disable aggregator, check tables, uninstall aggregator, check tables.
     $edit = array();
@@ -98,6 +133,7 @@
     $this->assertText(t('hook_modules_disabled fired for aggregator'), t('hook_modules_disabled fired.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', TRUE);
+    $this->assertLogMessage('system', "%module module disabled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
 
     // Uninstall the module.
     $edit = array();
@@ -111,6 +147,7 @@
     $this->assertText(t('hook_modules_uninstalled fired for aggregator'), t('hook_modules_uninstalled fired.'));
     $this->assertModules(array('aggregator'), FALSE);
     $this->assertTableCount('aggregator', FALSE);
+    $this->assertLogMessage('system', "%module module uninstalled.", array('%module' => 'aggregator'), WATCHDOG_INFO);
   }
 }
 
