diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractActivator.java b/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractActivator.java
index 503825a..ec919fd 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractActivator.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractActivator.java
@@ -18,38 +18,26 @@
 
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
-import org.apache.felix.http.base.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+import org.apache.felix.http.base.internal.logger.LogServiceLogger;
 
 public abstract class AbstractActivator
     implements BundleActivator
 {
     private BundleContext context;
-    private DispatcherServlet dispatcher;
-    private HttpServiceController controller;
+    private LogServiceLogger logger;
 
     protected final BundleContext getBundleContext()
     {
         return this.context;
     }
 
-    protected final DispatcherServlet getDispatcherServlet()
-    {
-        return this.dispatcher;
-    }
-
-    protected final HttpServiceController getHttpServiceController()
-    {
-        return this.controller;
-    }
-
     public final void start(BundleContext context)
         throws Exception
     {
         this.context = context;
-        this.controller = new HttpServiceController(this.context);
-        this.dispatcher = new DispatcherServlet(this.controller);
-
-        SystemLogger.get().open(context);
+        this.logger = new LogServiceLogger(context);
+        SystemLogger.setLogService(this.logger);
         doStart();
     }
 
@@ -57,10 +45,7 @@
         throws Exception
     {
         doStop();
-
-        this.controller.unregister();
-        this.dispatcher.destroy();
-        SystemLogger.get().close();
+        this.logger.close();
     }
 
     protected abstract void doStart()
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractHttpActivator.java b/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractHttpActivator.java
new file mode 100644
index 0000000..c045700
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/AbstractHttpActivator.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.http.base.internal;
+
+public abstract class AbstractHttpActivator
+    extends AbstractActivator
+{
+    private DispatcherServlet dispatcher;
+    private HttpServiceController controller;
+
+    protected final DispatcherServlet getDispatcherServlet()
+    {
+        return this.dispatcher;
+    }
+
+    protected final HttpServiceController getHttpServiceController()
+    {
+        return this.controller;
+    }
+
+    protected void doStart()
+        throws Exception
+    {
+        this.controller = new HttpServiceController(getBundleContext());
+        this.dispatcher = new DispatcherServlet(this.controller);
+    }
+
+    protected void doStop()
+        throws Exception
+    {
+        this.controller.unregister();
+        this.dispatcher.destroy();
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
index 51ed942..34e07a6 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextImpl.java
@@ -19,7 +19,7 @@
 import org.osgi.service.http.HttpContext;
 import org.osgi.framework.Bundle;
 import org.apache.felix.http.base.internal.util.MimeTypes;
-import org.apache.felix.http.base.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 
 import javax.servlet.ServletContext;
 import javax.servlet.RequestDispatcher;
@@ -178,17 +178,17 @@
 
     public void log(String message)
     {
-        SystemLogger.get().info(message);
+        SystemLogger.info(message);
     }
 
     public void log(Exception cause, String message)
     {
-        SystemLogger.get().error(message, cause);
+        SystemLogger.error(message, cause);
     }
 
     public void log(String message, Throwable cause)
     {
-        SystemLogger.get().error(message, cause);
+        SystemLogger.error(message, cause);
     }
 
     public String getServletContextName()
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
index c461b0f..2fc3810 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/context/ServletContextManager.java
@@ -18,7 +18,6 @@
 
 import org.osgi.framework.Bundle;
 import org.osgi.service.http.HttpContext;
-
 import javax.servlet.ServletContext;
 import java.util.Map;
 import java.util.HashMap;
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/logger/AbstractLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/AbstractLogger.java
new file mode 100644
index 0000000..a1d2b7b
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/AbstractLogger.java
@@ -0,0 +1,23 @@
+package org.apache.felix.http.base.internal.logger;
+
+import org.osgi.service.log.LogService;
+import org.osgi.framework.ServiceReference;
+
+public abstract class AbstractLogger
+    implements LogService
+{
+    public final void log(int level, String message)
+    {
+        log(null, level, message, null);
+    }
+
+    public final void log(int level, String message, Throwable cause)
+    {
+        log(null, level, message, cause);
+    }
+
+    public final void log(ServiceReference ref, int level, String message)
+    {
+        log(ref, level, message, null);
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/logger/ConsoleLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/ConsoleLogger.java
new file mode 100644
index 0000000..d7d2c68
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/ConsoleLogger.java
@@ -0,0 +1,49 @@
+package org.apache.felix.http.base.internal.logger;
+
+import org.osgi.framework.ServiceReference;
+import java.io.PrintStream;
+
+public final class ConsoleLogger
+    extends AbstractLogger
+{
+    private final PrintStream out;
+
+    public ConsoleLogger()
+    {
+        this(System.out);
+    }
+
+    public ConsoleLogger(PrintStream out)
+    {
+        this.out = out;
+    }
+
+    public void log(ServiceReference ref, int level, String message, Throwable cause)
+    {
+        StringBuffer str = new StringBuffer();
+        switch (level) {
+            case LOG_DEBUG:
+                str.append("[DEBUG] ");
+                break;
+            case LOG_INFO:
+                str.append("[INFO] ");
+                break;
+            case LOG_WARNING:
+                str.append("[WARNING] ");
+                break;
+            case LOG_ERROR:
+                str.append("[ERROR] ");
+                break;
+        }
+
+        if (ref != null) {
+            str.append("(").append(ref.toString()).append(") ");
+        }
+
+        str.append(message);
+        this.out.println(str.toString());
+        if (cause != null) {
+            cause.printStackTrace(this.out);
+        }
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/logger/LogServiceLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/LogServiceLogger.java
new file mode 100644
index 0000000..cdab153
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/LogServiceLogger.java
@@ -0,0 +1,35 @@
+package org.apache.felix.http.base.internal.logger;
+
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+
+public final class LogServiceLogger
+    extends AbstractLogger
+{
+    private final ConsoleLogger consoleLogger;
+    private final ServiceTracker tracker;
+
+    public LogServiceLogger(BundleContext context)
+    {
+        this.consoleLogger = new ConsoleLogger();
+        this.tracker = new ServiceTracker(context, LogService.class.getName(), null);
+        this.tracker.open();
+    }
+
+    public void close()
+    {
+        this.tracker.close();
+    }
+
+    public void log(ServiceReference ref, int level, String message, Throwable cause)
+    {
+        LogService log = (LogService)this.tracker.getService();
+        if (log != null) {
+            log.log(ref, level, message, cause);
+        } else {
+            this.consoleLogger.log(ref, level, message, cause);
+        }
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/logger/NopLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/NopLogger.java
new file mode 100644
index 0000000..171eb60
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/NopLogger.java
@@ -0,0 +1,12 @@
+package org.apache.felix.http.base.internal.logger;
+
+import org.osgi.framework.ServiceReference;
+
+public final class NopLogger
+    extends AbstractLogger
+{
+    public void log(ServiceReference ref, int level, String message, Throwable cause)
+    {
+        // Do nothing
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/logger/SystemLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/SystemLogger.java
new file mode 100644
index 0000000..ef9c7f2
--- /dev/null
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/logger/SystemLogger.java
@@ -0,0 +1,41 @@
+package org.apache.felix.http.base.internal.logger;
+
+import org.osgi.service.log.LogService;
+
+public final class SystemLogger
+{
+    private final static LogService NOP = new NopLogger();
+    private static LogService LOGGER;
+
+    public static void setLogService(LogService service)
+    {
+        if (LOGGER == null) {
+            LOGGER = service;
+        }
+    }
+
+    private static LogService getLogger()
+    {
+        return LOGGER != null ? LOGGER : NOP;
+    }
+    
+    public static void debug(String message)
+    {
+        getLogger().log(LogService.LOG_DEBUG, message);
+    }
+
+    public static void info(String message)
+    {
+        getLogger().log(LogService.LOG_INFO, message);
+    }
+
+    public static void warning(String message, Throwable cause)
+    {
+        getLogger().log(LogService.LOG_WARNING, message, cause);
+    }
+
+    public static void error(String message, Throwable cause)
+    {
+        getLogger().log(LogService.LOG_ERROR, message, cause);
+    }
+}
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
index 45961d5..2dd1c3a 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceFactory.java
@@ -20,7 +20,6 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.ServiceRegistration;
 import org.apache.felix.http.base.internal.handler.HandlerRegistry;
-
 import javax.servlet.ServletContext;
 
 public final class HttpServiceFactory
@@ -37,7 +36,7 @@
 
     public Object getService(Bundle bundle, ServiceRegistration reg)
     {
-        return new HttpServiceImpl(this.context, this.handlerRegistry, bundle);
+        return new HttpServiceImpl(bundle, this.context, this.handlerRegistry);
     }
 
     public void ungetService(Bundle bundle, ServiceRegistration reg, Object service)
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
index e972967..c08f1f5 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/service/HttpServiceImpl.java
@@ -22,7 +22,7 @@
 import org.apache.felix.http.base.internal.handler.HandlerRegistry;
 import org.apache.felix.http.base.internal.handler.FilterHandler;
 import org.apache.felix.http.base.internal.handler.ServletHandler;
-import org.apache.felix.http.base.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 import org.osgi.service.http.HttpContext;
 import org.osgi.service.http.NamespaceException;
 import org.osgi.framework.Bundle;
@@ -42,13 +42,13 @@
     private final HashSet<Filter> localFilters;
     private final ServletContextManager contextManager;
 
-    public HttpServiceImpl(ServletContext context, HandlerRegistry handlerRegistry, Bundle bundle)
+    public HttpServiceImpl(Bundle bundle, ServletContext context, HandlerRegistry handlerRegistry)
     {
         this.bundle = bundle;
         this.handlerRegistry = handlerRegistry;
         this.localServlets = new HashSet<Servlet>();
         this.localFilters = new HashSet<Filter>();
-        this.contextManager = new ServletContextManager(bundle, context);
+        this.contextManager = new ServletContextManager(this.bundle, context);
     }
 
     private ExtServletContext getServletContext(HttpContext context)
@@ -109,7 +109,7 @@
             Servlet servlet = new ResourceServlet(name);
             registerServlet(alias, servlet, null, context);
         } catch (ServletException e) {
-            SystemLogger.get().error("Failed to register resources", e);
+            SystemLogger.error("Failed to register resources", e);
         }
     }
 
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/util/SystemLogger.java b/http/base/src/main/java/org/apache/felix/http/base/internal/util/SystemLogger.java
deleted file mode 100644
index 484c027..0000000
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/util/SystemLogger.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.http.base.internal.util;
-
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
-
-public final class SystemLogger
-{
-    private final static SystemLogger INSTANCE =
-        new SystemLogger();
-
-    private ServiceTracker tracker;
-
-    private SystemLogger()
-    {
-    }
-
-    public void open(BundleContext context)
-    {
-        if (this.tracker != null) {
-            return;
-        }
-        
-        this.tracker = new ServiceTracker(context, LogService.class.getName(), null);
-        this.tracker.open();
-    }
-
-    public void close()
-    {
-        this.tracker.close();
-        this.tracker = null;
-    }
-
-    public void debug(String message)
-    {
-        log(LogService.LOG_DEBUG, message, null);
-    }
-
-    public void info(String message)
-    {
-        log(LogService.LOG_INFO, message, null);
-    }
-
-    public void warning(String message, Throwable cause)
-    {
-        log(LogService.LOG_WARNING, message, cause);
-    }
-
-    public void error(String message, Throwable cause)
-    {
-        log(LogService.LOG_ERROR, message, cause);
-    }
-
-    private void log(int level, String message, Throwable cause)
-    {
-        LogService log = (LogService)this.tracker.getService();
-        if (log != null) {
-            log.log(level, message, cause);
-        } else {
-            System.out.println(message);
-            if (cause != null) {
-                cause.printStackTrace(System.out);
-            }
-        }
-    }
-
-    public static SystemLogger get()
-    {
-        return INSTANCE;
-    }
-}
\ No newline at end of file
diff --git a/http/bridge/src/main/java/org/apache/felix/http/bridge/internal/BridgeActivator.java b/http/bridge/src/main/java/org/apache/felix/http/bridge/internal/BridgeActivator.java
index 08dc565..888dbe3 100644
--- a/http/bridge/src/main/java/org/apache/felix/http/bridge/internal/BridgeActivator.java
+++ b/http/bridge/src/main/java/org/apache/felix/http/bridge/internal/BridgeActivator.java
@@ -18,24 +18,20 @@
 
 import javax.servlet.http.HttpServlet;
 import java.util.Hashtable;
-import org.apache.felix.http.base.internal.AbstractActivator;
+import org.apache.felix.http.base.internal.AbstractHttpActivator;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 
 public final class BridgeActivator
-    extends AbstractActivator
+    extends AbstractHttpActivator
 {
     @Override
     protected void doStart()
         throws Exception
     {
+        super.doStart();
         Hashtable<String, Object> props = new Hashtable<String, Object>();
         props.put("http.felix.dispatcher", getDispatcherServlet().getClass().getName());
         getBundleContext().registerService(HttpServlet.class.getName(), getDispatcherServlet(), props);
-    }
-
-    @Override
-    protected void doStop()
-        throws Exception
-    {
-        // Do nothing
+        SystemLogger.info("Started bridged http service");
     }
 }
diff --git a/http/bundle/pom.xml b/http/bundle/pom.xml
index a2f2325..8d75432 100644
--- a/http/bundle/pom.xml
+++ b/http/bundle/pom.xml
@@ -27,7 +27,7 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <name>Apache Felix Http Bridge</name>
+    <name>Apache Felix Http Bundle</name>
     <artifactId>org.apache.felix.http.bundle</artifactId>
     <packaging>bundle</packaging>
 
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
index 9549274..791045e 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyActivator.java
@@ -16,16 +16,17 @@
  */
 package org.apache.felix.http.jetty.internal;
 
-import org.apache.felix.http.base.internal.AbstractActivator;
+import org.apache.felix.http.base.internal.AbstractHttpActivator;
 
 public final class JettyActivator
-    extends AbstractActivator 
+    extends AbstractHttpActivator 
 {
     private JettyService jetty;
 
     protected void doStart()
         throws Exception
     {
+        super.doStart();
         this.jetty = new JettyService(getBundleContext(), getDispatcherServlet());
         this.jetty.start();
     }
@@ -34,5 +35,6 @@
         throws Exception
     {
         this.jetty.stop();
+        super.doStop();
     }
 }
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
index 13f025c..6fd1312 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyLogger.java
@@ -17,8 +17,7 @@
 package org.apache.felix.http.jetty.internal;
 
 import org.mortbay.log.Logger;
-import org.apache.felix.http.base.internal.util.SystemLogger;
-
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 import java.util.Map;
 import java.util.HashMap;
 
@@ -65,27 +64,27 @@
 
     public void debug(String msg, Throwable cause)
     {
-        SystemLogger.get().debug(msg);
+        SystemLogger.debug(msg);
     }
 
     public void debug(String msg, Object arg0, Object arg1)
     {
-        SystemLogger.get().debug(format(msg, arg0, arg1));
+        SystemLogger.debug(format(msg, arg0, arg1));
     }
 
     public void info(String msg, Object arg0, Object arg1)
     {
-        SystemLogger.get().info(format(msg, arg0, arg1));
+        SystemLogger.info(format(msg, arg0, arg1));
     }
 
     public void warn(String msg, Throwable cause)
     {
-        SystemLogger.get().warning(msg, cause);
+        SystemLogger.warning(msg, cause);
     }
 
     public void warn( String msg, Object arg0, Object arg1 )
     {
-        SystemLogger.get().warning(format(msg, arg0, arg1), null);
+        SystemLogger.warning(format(msg, arg0, arg1), null);
     }
 
     public String toString()
diff --git a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
index 7cfffe9..3c42978 100644
--- a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
+++ b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
@@ -29,8 +29,9 @@
 import org.mortbay.jetty.servlet.*;
 import org.mortbay.log.Log;
 import org.mortbay.log.StdErrLog;
-import org.apache.felix.http.base.internal.util.SystemLogger;
 import org.apache.felix.http.base.internal.DispatcherServlet;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+
 import java.util.Properties;
 import java.util.Dictionary;
 
@@ -99,7 +100,7 @@
         try {
             initializeJetty();
         } catch (Exception e) {
-            SystemLogger.get().error("Exception while initializing Jetty.", e);
+            SystemLogger.error("Exception while initializing Jetty.", e);
         }
     }
 
@@ -108,7 +109,7 @@
         try {
             this.server.stop();
         } catch (Exception e) {
-            SystemLogger.get().error("Exception while stopping Jetty.", e);
+            SystemLogger.error("Exception while stopping Jetty.", e);
         }
     }
 
diff --git a/http/whiteboard/pom.xml b/http/whiteboard/pom.xml
index 1b49f15..888a0cc 100644
--- a/http/whiteboard/pom.xml
+++ b/http/whiteboard/pom.xml
@@ -42,6 +42,7 @@
                             org.apache.felix.http.whiteboard.internal.WhiteboardActivator
                         </Bundle-Activator>
                         <Private-Package>
+                            org.apache.felix.http.base.*,
                             org.apache.felix.http.whiteboard.*
                         </Private-Package>
                         <Import-Package>
@@ -72,6 +73,12 @@
             <version>${pom.version}</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>${pom.groupId}</groupId>
+            <artifactId>org.apache.felix.http.base</artifactId>
+            <version>${pom.version}</version>
+            <scope>provided</scope>
+        </dependency>        
     </dependencies>
 
 </project>
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/WhiteboardActivator.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/WhiteboardActivator.java
index 0ffb830..43ec224 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/WhiteboardActivator.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/WhiteboardActivator.java
@@ -16,8 +16,6 @@
  */
 package org.apache.felix.http.whiteboard.internal;
 
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.util.tracker.ServiceTracker;
 import org.apache.felix.http.whiteboard.internal.tracker.FilterTracker;
 import org.apache.felix.http.whiteboard.internal.tracker.HttpContextTracker;
@@ -25,11 +23,11 @@
 import org.apache.felix.http.whiteboard.internal.tracker.HttpServiceTracker;
 import org.apache.felix.http.whiteboard.internal.manager.ExtenderManagerImpl;
 import org.apache.felix.http.whiteboard.internal.manager.ExtenderManager;
-import org.apache.felix.http.whiteboard.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.AbstractActivator;
 import java.util.ArrayList;
 
 public final class WhiteboardActivator
-    implements BundleActivator
+    extends AbstractActivator
 {
     private final ArrayList<ServiceTracker> trackers;
     private ExtenderManager manager;
@@ -39,15 +37,14 @@
         this.trackers = new ArrayList<ServiceTracker>();
     }
 
-    public void start(BundleContext context)
+    protected void doStart()
         throws Exception
     {
-        SystemLogger.get().open(context);
         this.manager = new ExtenderManagerImpl();
-        addTracker(new HttpContextTracker(context, this.manager));
-        addTracker(new FilterTracker(context, this.manager));
-        addTracker(new ServletTracker(context, this.manager));
-        addTracker(new HttpServiceTracker(context, this.manager));
+        addTracker(new HttpContextTracker(getBundleContext(), this.manager));
+        addTracker(new FilterTracker(getBundleContext(), this.manager));
+        addTracker(new ServletTracker(getBundleContext(), this.manager));
+        addTracker(new HttpServiceTracker(getBundleContext(), this.manager));
     }
 
     private void addTracker(ServiceTracker tracker)
@@ -56,7 +53,7 @@
         tracker.open();
     }
 
-    public void stop(BundleContext context)
+    protected void doStop()
         throws Exception
     {
         for (ServiceTracker tracker : this.trackers) {
@@ -65,6 +62,5 @@
 
         this.trackers.clear();
         this.manager.unregisterAll();
-        SystemLogger.get().close();
     }
 }
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ExtenderManagerImpl.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ExtenderManagerImpl.java
index e144e1e..063116b 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ExtenderManagerImpl.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ExtenderManagerImpl.java
@@ -22,7 +22,7 @@
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 import org.apache.felix.http.api.ExtHttpService;
-import org.apache.felix.http.whiteboard.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 
 import javax.servlet.Servlet;
 import javax.servlet.Filter;
@@ -141,9 +141,9 @@
     {
         this.httpService = service;
         if (this.httpService instanceof ExtHttpService) {
-            SystemLogger.get().info("Detected extended HttpService. Filters enabled.");
+            SystemLogger.info("Detected extended HttpService. Filters enabled.");
         } else {
-            SystemLogger.get().info("Standard HttpService. Filters disabled.");
+            SystemLogger.info("Standard HttpService. Filters disabled.");
         }
 
         registerAll();
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/FilterMapping.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/FilterMapping.java
index bcccc0a..8ae62b4 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/FilterMapping.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/FilterMapping.java
@@ -19,7 +19,8 @@
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.HttpContext;
 import org.apache.felix.http.api.ExtHttpService;
-import org.apache.felix.http.whiteboard.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+
 import javax.servlet.Filter;
 
 public final class FilterMapping
@@ -49,7 +50,7 @@
         try {
             httpService.registerFilter(this.filter, this.pattern, getInitParams(), ranking, getContext());
         } catch (Exception e) {
-            SystemLogger.get().error("Failed to register filter", e);
+            SystemLogger.error("Failed to register filter", e);
         }
     }
 
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
index d44056e..e5f105e 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/HttpContextManager.java
@@ -18,7 +18,7 @@
 
 import org.osgi.framework.Bundle;
 import org.osgi.service.http.HttpContext;
-import org.apache.felix.http.whiteboard.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
 import java.util.HashMap;
 
 public final class HttpContextManager
@@ -46,9 +46,9 @@
             context = new DefaultHttpContext(bundle);
             this.idMap.put(id, context);
             this.contextMap.put(context, id);
-            SystemLogger.get().debug("Added context with id [" + contextId + "]");
+            SystemLogger.debug("Added context with id [" + contextId + "]");
         } else {
-            SystemLogger.get().debug("Reusing context with id [" + contextId + "]");            
+            SystemLogger.debug("Reusing context with id [" + contextId + "]");            
         }
 
         return context;
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ServletMapping.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ServletMapping.java
index 408c58d..0a283e9 100644
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ServletMapping.java
+++ b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/manager/ServletMapping.java
@@ -18,7 +18,8 @@
 
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.HttpContext;
-import org.apache.felix.http.whiteboard.internal.util.SystemLogger;
+import org.apache.felix.http.base.internal.logger.SystemLogger;
+
 import javax.servlet.Servlet;
 
 public final class ServletMapping
@@ -39,7 +40,7 @@
         try {
             httpService.registerServlet(this.alias, this.servlet, getInitParams(), getContext());
         } catch (Exception e) {
-            SystemLogger.get().error("Failed to register servlet", e);
+            SystemLogger.error("Failed to register servlet", e);
         }
     }
 
diff --git a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/util/SystemLogger.java b/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/util/SystemLogger.java
deleted file mode 100644
index df68069..0000000
--- a/http/whiteboard/src/main/java/org/apache/felix/http/whiteboard/internal/util/SystemLogger.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.http.whiteboard.internal.util;
-
-import org.osgi.util.tracker.ServiceTracker;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
-
-public final class SystemLogger
-{
-    private final static SystemLogger INSTANCE =
-        new SystemLogger();
-    
-    private ServiceTracker tracker;
-
-    private SystemLogger()
-    {
-    }
-
-    public void open(BundleContext context)
-    {
-        this.tracker = new ServiceTracker(context, LogService.class.getName(), null);
-        this.tracker.open();
-    }
-
-    public void close()
-    {
-        this.tracker.close();
-    }
-
-    public void debug(String message)
-    {
-        log(LogService.LOG_DEBUG, message, null);
-    }
-
-    public void info(String message)
-    {
-        log(LogService.LOG_INFO, message, null);
-    }
-
-    public void warning(String message, Throwable cause)
-    {
-        log(LogService.LOG_WARNING, message, cause);
-    }
-
-    public void error(String message, Throwable cause)
-    {
-        log(LogService.LOG_ERROR, message, cause);
-    }
-
-    private void log(int level, String message, Throwable cause)
-    {
-        LogService log = (LogService)this.tracker.getService();
-        if (log != null) {
-            log.log(level, message, cause);
-        } else {
-            System.out.println(message);
-            if (cause != null) {
-                cause.printStackTrace(System.out);
-            }
-        }
-    }
-
-    public static SystemLogger get()
-    {
-        return INSTANCE;
-    }
-}
\ No newline at end of file
