diff --git a/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java b/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
index cb79b8c..c0aaae2 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
@@ -18,9 +18,11 @@
  */
 package org.apache.felix.cm;
 
+
 import java.io.File;
 import java.io.InputStream;
 import java.util.Dictionary;
+import java.util.Properties;
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
@@ -33,50 +35,80 @@
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
 
+
 /**
  * The <code>MockBundleContext</code> is a dummy implementation of the
  * <code>BundleContext</code> interface. No methods are implemented here, that
- * is all methods have no effect and return <code>null</code> if a return
- * value is specified.
+ * is all methods have no effect and return <code>null</code> if a return value
+ * is specified.
  * <p>
  * Extensions may overwrite methods as see fit.
  */
 public class MockBundleContext implements BundleContext
 {
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#addBundleListener(org.osgi.framework.BundleListener)
+    private final Properties properties = new Properties();
+
+
+    public void setProperty( String name, String value )
+    {
+        if ( value == null )
+        {
+            properties.remove( name );
+        }
+        else
+        {
+            properties.setProperty( name, value );
+        }
+    }
+
+
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#addBundleListener(org.osgi.framework
+     * .BundleListener)
      */
     public void addBundleListener( BundleListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#addFrameworkListener(org.osgi.framework.FrameworkListener)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#addFrameworkListener(org.osgi.framework
+     * .FrameworkListener)
      */
     public void addFrameworkListener( FrameworkListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework.ServiceListener)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework
+     * .ServiceListener)
      */
     public void addServiceListener( ServiceListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework.ServiceListener, java.lang.String)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework
+     * .ServiceListener, java.lang.String)
      */
     public void addServiceListener( ServiceListener arg0, String arg1 ) throws InvalidSyntaxException
     {
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#createFilter(java.lang.String)
      */
     public Filter createFilter( String arg0 ) throws InvalidSyntaxException
@@ -85,8 +117,11 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#getAllServiceReferences(java.lang.String, java.lang.String)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#getAllServiceReferences(java.lang.String
+     * , java.lang.String)
      */
     public ServiceReference[] getAllServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
     {
@@ -94,7 +129,8 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#getBundle()
      */
     public Bundle getBundle()
@@ -103,7 +139,8 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#getBundle(long)
      */
     public Bundle getBundle( long arg0 )
@@ -112,7 +149,8 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#getBundles()
      */
     public Bundle[] getBundles()
@@ -121,7 +159,8 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#getDataFile(java.lang.String)
      */
     public File getDataFile( String arg0 )
@@ -130,17 +169,20 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#getProperty(java.lang.String)
      */
-    public String getProperty( String arg0 )
+    public String getProperty( String name )
     {
-        return null;
+        return properties.getProperty( name );
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#getService(org.osgi.framework.ServiceReference)
+    /*
+     * (non-Javadoc)
+     * @seeorg.osgi.framework.BundleContext#getService(org.osgi.framework.
+     * ServiceReference)
      */
     public Object getService( ServiceReference arg0 )
     {
@@ -148,8 +190,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#getServiceReference(java.lang.String)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#getServiceReference(java.lang.String)
      */
     public ServiceReference getServiceReference( String arg0 )
     {
@@ -157,8 +201,11 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#getServiceReferences(java.lang.String, java.lang.String)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#getServiceReferences(java.lang.String,
+     * java.lang.String)
      */
     public ServiceReference[] getServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
     {
@@ -166,7 +213,8 @@
     }
 
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#installBundle(java.lang.String)
      */
     public Bundle installBundle( String arg0 ) throws BundleException
@@ -175,8 +223,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#installBundle(java.lang.String, java.io.InputStream)
+    /*
+     * (non-Javadoc)
+     * @see org.osgi.framework.BundleContext#installBundle(java.lang.String,
+     * java.io.InputStream)
      */
     public Bundle installBundle( String arg0, InputStream arg1 ) throws BundleException
     {
@@ -184,8 +234,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)
+    /*
+     * (non-Javadoc)
+     * @see org.osgi.framework.BundleContext#registerService(java.lang.String[],
+     * java.lang.Object, java.util.Dictionary)
      */
     public ServiceRegistration registerService( String[] arg0, Object arg1, Dictionary arg2 )
     {
@@ -193,8 +245,10 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#registerService(java.lang.String, java.lang.Object, java.util.Dictionary)
+    /*
+     * (non-Javadoc)
+     * @see org.osgi.framework.BundleContext#registerService(java.lang.String,
+     * java.lang.Object, java.util.Dictionary)
      */
     public ServiceRegistration registerService( String arg0, Object arg1, Dictionary arg2 )
     {
@@ -202,32 +256,43 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#removeBundleListener(org.osgi.framework.BundleListener)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#removeBundleListener(org.osgi.framework
+     * .BundleListener)
      */
     public void removeBundleListener( BundleListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#removeFrameworkListener(org.osgi.framework.FrameworkListener)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#removeFrameworkListener(org.osgi.framework
+     * .FrameworkListener)
      */
     public void removeFrameworkListener( FrameworkListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#removeServiceListener(org.osgi.framework.ServiceListener)
+    /*
+     * (non-Javadoc)
+     * @see
+     * org.osgi.framework.BundleContext#removeServiceListener(org.osgi.framework
+     * .ServiceListener)
      */
     public void removeServiceListener( ServiceListener arg0 )
     {
     }
 
 
-    /* (non-Javadoc)
-     * @see org.osgi.framework.BundleContext#ungetService(org.osgi.framework.ServiceReference)
+    /*
+     * (non-Javadoc)
+     * @seeorg.osgi.framework.BundleContext#ungetService(org.osgi.framework.
+     * ServiceReference)
      */
     public boolean ungetService( ServiceReference arg0 )
     {
diff --git a/configadmin/src/test/java/org/apache/felix/cm/impl/ConfigurationManagerTest.java b/configadmin/src/test/java/org/apache/felix/cm/impl/ConfigurationManagerTest.java
index d438c9e..9a26440 100644
--- a/configadmin/src/test/java/org/apache/felix/cm/impl/ConfigurationManagerTest.java
+++ b/configadmin/src/test/java/org/apache/felix/cm/impl/ConfigurationManagerTest.java
@@ -27,6 +27,7 @@
 
 import org.apache.felix.cm.MockBundleContext;
 import org.apache.felix.cm.MockLogService;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 import org.osgi.util.tracker.ServiceTracker;
 
@@ -160,6 +161,35 @@
     }
 
 
+    public void testLogSetup()
+    {
+        final MockBundleContext bundleContext = new MockBundleContext();
+        ConfigurationManager configMgr = createConfigurationManager( null );
+
+        // default value is 2
+        bundleContext.setProperty( "felix.cm.loglevel", null );
+        configMgr.start( bundleContext );
+        assertEquals( 2, getLogLevel( configMgr ) );
+        configMgr.stop( bundleContext );
+
+        // illegal number yields default value
+        bundleContext.setProperty( "felix.cm.loglevel", "not-a-number" );
+        configMgr.start( bundleContext );
+        assertEquals( 2, getLogLevel( configMgr ) );
+        configMgr.stop( bundleContext );
+
+        bundleContext.setProperty( "felix.cm.loglevel", "-100" );
+        configMgr.start( bundleContext );
+        assertEquals( -100, getLogLevel( configMgr ) );
+        configMgr.stop( bundleContext );
+
+        bundleContext.setProperty( "felix.cm.loglevel", "4" );
+        configMgr.start( bundleContext );
+        assertEquals( 4, getLogLevel( configMgr ) );
+        configMgr.stop( bundleContext );
+    }
+
+
     private void assertNoLog( ConfigurationManager configMgr, int level, String message, Throwable t )
     {
         try
@@ -206,7 +236,25 @@
         }
         catch ( Throwable ignore )
         {
-            ignore.printStackTrace( System.out );
+            throw ( IllegalArgumentException ) new IllegalArgumentException( "Cannot set logLevel field value" )
+                .initCause( ignore );
+        }
+    }
+
+
+    private static int getLogLevel( ConfigurationManager configMgr )
+    {
+        final String fieldName = "logLevel";
+        try
+        {
+            Field field = configMgr.getClass().getDeclaredField( fieldName );
+            field.setAccessible( true );
+            return field.getInt( configMgr );
+        }
+        catch ( Throwable ignore )
+        {
+            throw ( IllegalArgumentException ) new IllegalArgumentException( "Cannot get logLevel field value" )
+                .initCause( ignore );
         }
     }
 
@@ -229,7 +277,8 @@
         }
         catch ( Throwable ignore )
         {
-            ignore.printStackTrace( System.out );
+            throw ( IllegalArgumentException ) new IllegalArgumentException( "Cannot set logTracker field value" )
+                .initCause( ignore );
         }
 
         return configMgr;
