Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt	(revision 6753)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt	(revision 6754)
@@ -557,5 +557,5 @@
     >>> 'datacenter.log' in browser.contents
     True
-    >>> browser.getControl('Show', index=1).click()
+    >>> browser.getControl('Show', index=0).click()
     >>> '<input type="submit" name="back" value="Back" />' in browser.contents
     True
Index: main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 6753)
+++ main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py	(revision 6754)
@@ -484,2 +484,16 @@
         paths.
         """
+
+class ILoggerCollector(Interface):
+
+    def getLoggers(site):
+        """Return all loggers registered for `site`.
+        """
+
+    def registerLogger(site, logging_component):
+        """Register a logging component residing in `site`.
+        """
+
+    def unregisterLogger(site, logging_component):
+        """Unregister a logger.
+        """
Index: main/waeup.sirp/trunk/src/waeup/sirp/testing.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/testing.py	(revision 6753)
+++ main/waeup.sirp/trunk/src/waeup/sirp/testing.py	(revision 6754)
@@ -284,4 +284,15 @@
     doctest.REPORT_NDIFF + doctest.ELLIPSIS + doctest.NORMALIZE_WHITESPACE)
 
+def clear_logger_collector():
+    from zope.component import queryUtility, getGlobalSiteManager
+    from waeup.sirp.interfaces import ILoggerCollector
+    collector = queryUtility(ILoggerCollector)
+    if collector is None:
+        return
+    keys = collector.keys()
+    for key in keys:
+        del collector[key]
+    return
+
 class FunctionalTestCase(FunctionalTestCase):
     """A test case that supports checking output diffs in doctest style.
@@ -296,4 +307,5 @@
         super(FunctionalTestCase, self).tearDown()
         remove_new_loggers(self.functional_old_loggers)
+        clear_logger_collector()
         return
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/utils/logger.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/utils/logger.py	(revision 6753)
+++ main/waeup.sirp/trunk/src/waeup/sirp/utils/logger.py	(revision 6754)
@@ -84,5 +84,6 @@
 from zope.component import queryUtility
 from zope.interface import Interface, Attribute, implements
-from waeup.sirp.interfaces import IDataCenter, IDataCenterStorageMovedEvent
+from waeup.sirp.interfaces import (
+    IDataCenter, IDataCenterStorageMovedEvent, ILoggerCollector)
 
 #: Default logfile size (5 KB)
@@ -300,18 +301,4 @@
 
 
-class ILoggerCollector(Interface):
-
-    def getLoggers(site):
-        """Return all loggers registered for `site`.
-        """
-
-    def registerLogger(site, logging_component):
-        """Register a logging component residing in `site`.
-        """
-
-    def unregisterLogger(site, logging_component):
-        """Unregister a logger.
-        """
-
 class LoggerCollector(dict, grok.GlobalUtility):
     """A global utility providing `ILoggerCollector`.
@@ -380,2 +367,14 @@
             logger.logger_logfile_changed()
     return
+
+from waeup.sirp.interfaces import IUniversity
+@grok.subscribe(IUniversity, grok.IObjectRemovedEvent)
+def handle_site_removal(obj, event):
+    collector = queryUtility(ILoggerCollector)
+    name = getattr(obj, '__name__', None)
+    if name is None:
+        return
+    if name not in collector.keys():
+        return
+    del collector[name]
+    return
Index: main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_logger.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_logger.py	(revision 6753)
+++ main/waeup.sirp/trunk/src/waeup/sirp/utils/tests/test_logger.py	(revision 6754)
@@ -8,7 +8,5 @@
 from zope.interface.verify import verifyClass, verifyObject
 from waeup.sirp.app import University
-from waeup.sirp.testing import (
-    FunctionalLayer, FunctionalTestCase, get_all_loggers,
-    remove_new_loggers, remove_logger)
+from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
 
 from waeup.sirp.utils.logger import (
@@ -259,5 +257,4 @@
     def setUp(self):
         super(LoggerCollectorTests, self).setUp()
-        self.old_loggers = get_all_loggers()
         # Setup a sample site for each test
         app = University()
@@ -281,5 +278,4 @@
     def tearDown(self):
         super(LoggerCollectorTests, self).tearDown()
-        remove_new_loggers(self.old_loggers)
         shutil.rmtree(self.workdir)
         shutil.rmtree(self.dc_root)
@@ -357,6 +353,4 @@
     def setUp(self):
         super(LogfileChangeTests, self).setUp()
-        remove_logger('waeup.sirp.app') # In case it lingers around
-        self.old_loggers = get_all_loggers()
         # Setup a sample site for each test
         app = University()
@@ -373,5 +367,4 @@
         self.component = self.app['mycomponent']
         setSite(self.app)
-
         self.component = LoggingComponent()
         return
@@ -379,5 +372,4 @@
     def tearDown(self):
         super(LogfileChangeTests, self).tearDown()
-        remove_new_loggers(self.old_loggers)
         shutil.rmtree(self.workdir)
         shutil.rmtree(self.dc_root)
@@ -397,2 +389,15 @@
         self.assertTrue(filename2.startswith(self.dc_root_new))
         return
+
+    def test_storage_deletion(self):
+        # When a site is deleted, the loggers should go away as well
+        self.dc_root_new = tempfile.mkdtemp()
+        logger1 = self.component.logger.handlers # create entry in collector
+        collector = queryUtility(ILoggerCollector)
+        loggers1 = collector.keys()
+        root = self.app.__parent__
+        del root['app']
+        loggers2 = collector.keys()
+        self.assertEqual(loggers1, ['app'])
+        self.assertEqual(loggers2, [])
+        return
