directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r278789 - in /directory/standalone/trunk/osgi: apacheds/src/main/java/org/apache/ldap/server/ changepw/src/main/java/org/apache/changepw/ dns/src/main/java/org/apache/dns/ jmx/src/main/java/org/apache/jmx/ kerberos/src/main/java/org/apache/...
Date Mon, 05 Sep 2005 16:25:02 GMT
Author: erodriguez
Date: Mon Sep  5 09:24:41 2005
New Revision: 278789

URL: http://svn.apache.org/viewcvs?rev=278789&view=rev
Log:
Replaced all System.out statements with SLF4J logging in the OSGi wrappers.

Modified:
    directory/standalone/trunk/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
    directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
    directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwConfig.java
    directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwServer.java
    directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/Activator.java
    directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsConfig.java
    directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsServer.java
    directory/standalone/trunk/osgi/jmx/src/main/java/org/apache/jmx/JmxLogger.java
    directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
    directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosConfig.java
    directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServer.java
    directory/standalone/trunk/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
    directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/Activator.java
    directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java
    directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java
    directory/standalone/trunk/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
    directory/standalone/trunk/osgi/network/src/main/java/org/apache/mina/Activator.java
    directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/Activator.java
    directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpConfig.java
    directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpServer.java

Modified: directory/standalone/trunk/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
(original)
+++ directory/standalone/trunk/osgi/apacheds/src/main/java/org/apache/ldap/server/Activator.java
Mon Sep  5 09:24:41 2005
@@ -43,9 +43,14 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     private InitialContextFactory factory;
     private ServiceRegistration registration;
 
@@ -56,7 +61,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache Backing Store." );
+        log.debug( "Starting Apache Backing Store." );
 
         Hashtable env = new Hashtable( setUpPartition() );
 
@@ -90,7 +95,7 @@
      */
     public void stop( BundleContext context ) throws BundleException
     {
-        System.out.println( "Stopping Apache Backing Store." );
+        log.debug( "Stopping Apache Backing Store." );
 
         Hashtable env = new ShutdownConfiguration().toJndiEnvironment();
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );

Modified: directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
(original)
+++ directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/Activator.java
Mon Sep  5 09:24:41 2005
@@ -41,12 +41,17 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a simple bundle that starts and stops the Apache Change Password
service.
  */
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     public static final String FACTORY_PID = "org.apache.changepw";
 
     private ServiceRegistry registry;
@@ -72,7 +77,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache Change Password." );
+        log.debug( "Starting Apache Change Password." );
 
         tracker = new ServiceTracker( context, ServiceRegistry.class.getName(), null );
         tracker.open();
@@ -163,7 +168,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache Change Password." );
+        log.debug( "Stopping Apache Change Password." );
 
         principalStore = null;
 

Modified: directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwConfig.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwConfig.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwConfig.java
(original)
+++ directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwConfig.java
Mon Sep  5 09:24:41 2005
@@ -20,8 +20,14 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class ChangepwConfig
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( ChangepwConfig.class );
+
     private static String SERVICE_PID = "service.pid";
 
     static String PID = "org.apache.changepw";
@@ -33,7 +39,7 @@
 
     public ChangepwConfig( Dictionary configuration )
     {
-        System.out.println( "Got props " + configuration );
+        log.debug( "Got props " + configuration );
 
         if ( configuration == null )
         {
@@ -42,7 +48,7 @@
 
         port = ( (Integer) configuration.get( CHANGEPW_PORT_KEY ) ).intValue();
 
-        System.out.println( "Change Password got port " + port );
+        log.debug( "Change Password got port " + port );
     }
 
     boolean isDifferent( Dictionary config )
@@ -62,7 +68,7 @@
 
     int getPort()
     {
-        System.out.println( "Config returning " + port );
+        log.debug( "Config returning " + port );
 
         return port;
     }

Modified: directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwServer.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwServer.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwServer.java
(original)
+++ directory/standalone/trunk/osgi/changepw/src/main/java/org/apache/changepw/ChangepwServer.java
Mon Sep  5 09:24:41 2005
@@ -27,9 +27,14 @@
 import org.apache.mina.protocol.ProtocolProvider;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ChangepwServer
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( ChangepwServer.class );
+
     private ServiceRegistry registry;
     private ProtocolProvider provider;
     private Service tcpService;
@@ -57,7 +62,7 @@
 
         try
         {
-            System.out.println( name + " starting on " + port );
+            log.debug( name + " starting on " + port );
 
             provider = new ChangePasswordProtocolProvider( new ChangePasswordConfiguration(),
store );
 
@@ -67,7 +72,7 @@
             registry.bind( udpService, provider );
             registry.bind( tcpService, provider );
 
-            System.out.println( name + " listening on port " + port );
+            log.debug( name + " listening on port " + port );
         }
         catch ( IOException ioe )
         {
@@ -90,6 +95,6 @@
         udpService = null;
         tcpService = null;
 
-        System.out.println( name + " has stopped listening on " + port );
+        log.debug( name + " has stopped listening on " + port );
     }
 }

Modified: directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/Activator.java (original)
+++ directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/Activator.java Mon Sep
 5 09:24:41 2005
@@ -42,12 +42,17 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a simple bundle that starts and stops the Apache DNS service.
  */
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     public static final String FACTORY_PID = "org.apache.dns";
 
     private ServiceRegistry registry;
@@ -73,7 +78,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache DNS." );
+        log.debug( "Starting Apache DNS." );
 
         tracker = new ServiceTracker( context, ServiceRegistry.class.getName(), null );
         tracker.open();
@@ -164,7 +169,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache DNS." );
+        log.debug( "Stopping Apache DNS." );
 
         store = null;
 

Modified: directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsConfig.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsConfig.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsConfig.java (original)
+++ directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsConfig.java Mon Sep
 5 09:24:41 2005
@@ -20,8 +20,14 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class DnsConfig
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( DnsConfig.class );
+
     private static String SERVICE_PID = "service.pid";
 
     static String PID = "org.apache.dns";
@@ -33,7 +39,7 @@
 
     public DnsConfig( Dictionary configuration )
     {
-        System.out.println( "Got props " + configuration );
+        log.debug( "Got props " + configuration );
 
         if ( configuration == null )
         {
@@ -42,7 +48,7 @@
 
         port = ( (Integer) configuration.get( DNS_PORT_KEY ) ).intValue();
 
-        System.out.println( "DNS got port " + port );
+        log.debug( "DNS got port " + port );
     }
 
     boolean isDifferent( Dictionary config )
@@ -62,7 +68,7 @@
 
     int getPort()
     {
-        System.out.println( "Config returning " + port );
+        log.debug( "Config returning " + port );
 
         return port;
     }

Modified: directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsServer.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsServer.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsServer.java (original)
+++ directory/standalone/trunk/osgi/dns/src/main/java/org/apache/dns/DnsServer.java Mon Sep
 5 09:24:41 2005
@@ -27,9 +27,14 @@
 import org.apache.mina.protocol.ProtocolProvider;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DnsServer
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( DnsServer.class );
+
     private ServiceRegistry registry;
     private ProtocolProvider provider;
     private Service tcpService;
@@ -57,7 +62,7 @@
 
         try
         {
-            System.out.println( name + " starting on " + port );
+            log.debug( name + " starting on " + port );
 
             provider = new DnsProtocolProvider( new DnsConfiguration(), store );
 
@@ -67,7 +72,7 @@
             registry.bind( udpService, provider );
             registry.bind( tcpService, provider );
 
-            System.out.println( name + " listening on port " + port );
+            log.debug( name + " listening on port " + port );
         }
         catch ( IOException ioe )
         {
@@ -90,6 +95,6 @@
         udpService = null;
         tcpService = null;
 
-        System.out.println( name + " has stopped listening on " + port );
+        log.debug( name + " has stopped listening on " + port );
     }
 }

Modified: directory/standalone/trunk/osgi/jmx/src/main/java/org/apache/jmx/JmxLogger.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/jmx/src/main/java/org/apache/jmx/JmxLogger.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/jmx/src/main/java/org/apache/jmx/JmxLogger.java (original)
+++ directory/standalone/trunk/osgi/jmx/src/main/java/org/apache/jmx/JmxLogger.java Mon Sep
 5 09:24:41 2005
@@ -24,9 +24,14 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class JmxLogger implements BundleActivator, JmxLoggerMBean
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( JmxLogger.class );
+
     private ObjectName osgiName = null;
 
     public void start( BundleContext context ) throws Exception
@@ -68,6 +73,6 @@
 
     public void log()
     {
-        System.out.println( "JMX Logger says SUCCESS." );
+        log.debug( "JMX Logger says SUCCESS." );
     }
 }

Modified: directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
(original)
+++ directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/Activator.java
Mon Sep  5 09:24:41 2005
@@ -41,12 +41,17 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a simple bundle that starts and stops the Apache Kerberos service.
  */
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     public static final String FACTORY_PID = "org.apache.kerberos";
 
     private ServiceRegistry registry;
@@ -72,7 +77,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache Kerberos." );
+        log.debug( "Starting Apache Kerberos." );
 
         tracker = new ServiceTracker( context, ServiceRegistry.class.getName(), null );
         tracker.open();
@@ -163,7 +168,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache Kerberos." );
+        log.debug( "Stopping Apache Kerberos." );
 
         principalStore = null;
 

Modified: directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosConfig.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosConfig.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosConfig.java
(original)
+++ directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosConfig.java
Mon Sep  5 09:24:41 2005
@@ -20,8 +20,14 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class KerberosConfig
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( KerberosConfig.class );
+
     private static String SERVICE_PID = "service.pid";
 
     static String PID = "org.apache.kerberos";
@@ -33,7 +39,7 @@
 
     public KerberosConfig( Dictionary configuration )
     {
-        System.out.println( "Got props " + configuration );
+        log.debug( "Got props " + configuration );
 
         if ( configuration == null )
         {
@@ -42,7 +48,7 @@
 
         port = ( (Integer) configuration.get( KERBEROS_PORT_KEY ) ).intValue();
 
-        System.out.println( "Kerberos got port " + port );
+        log.debug( "Kerberos got port " + port );
     }
 
     boolean isDifferent( Dictionary config )
@@ -62,7 +68,7 @@
 
     int getPort()
     {
-        System.out.println( "Config returning " + port );
+        log.debug( "Config returning " + port );
 
         return port;
     }

Modified: directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServer.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServer.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServer.java
(original)
+++ directory/standalone/trunk/osgi/kerberos/src/main/java/org/apache/kerberos/KerberosServer.java
Mon Sep  5 09:24:41 2005
@@ -27,9 +27,14 @@
 import org.apache.mina.protocol.ProtocolProvider;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class KerberosServer
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( KerberosServer.class );
+
     private ServiceRegistry registry;
     private ProtocolProvider provider;
     private Service tcpService;
@@ -57,7 +62,7 @@
 
         try
         {
-            System.out.println( name + " starting on " + port );
+            log.debug( name + " starting on " + port );
 
             provider = new KerberosProtocolProvider( new KdcConfiguration(), store );
 
@@ -67,7 +72,7 @@
             registry.bind( udpService, provider );
             registry.bind( tcpService, provider );
 
-            System.out.println( name + " listening on port " + port );
+            log.debug( name + " listening on port " + port );
         }
         catch ( IOException ioe )
         {
@@ -90,6 +95,6 @@
         udpService = null;
         tcpService = null;
 
-        System.out.println( name + " has stopped listening on " + port );
+        log.debug( name + " has stopped listening on " + port );
     }
 }

Modified: directory/standalone/trunk/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
(original)
+++ directory/standalone/trunk/osgi/launcher/src/main/java/org/apache/launcher/Launcher.java
Mon Sep  5 09:24:41 2005
@@ -25,6 +25,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.ungoverned.oscar.Oscar;
 
 /**
@@ -32,6 +34,9 @@
  */
 public class Launcher
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Launcher.class );
+
     /**  Description of the Field */
     private final static String DFLT_HOME_KEY = "launcher.home";
     private final static String DFLT_PROFILE = "launcher";
@@ -222,7 +227,7 @@
         }
         catch ( IOException e )
         {
-            System.out.println( "Error removing bundle cache : " + e );
+            log.debug( "Error removing bundle cache : " + e );
             //System.exit(-1);
         }
 
@@ -295,7 +300,7 @@
                     profileOccurence++;
                     if ( profileOccurence > 100 )
                     {
-                        System.out.println( "Error starting profile: " + target + " : " +
e );
+                        log.debug( "Error starting profile: " + target + " : " + e );
                         return;
                     }
 

Modified: directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/Activator.java (original)
+++ directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/Activator.java Mon
Sep  5 09:24:41 2005
@@ -34,12 +34,17 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a simple bundle that starts and stops the Apache LDAP service.
  */
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     public static final String FACTORY_PID = "org.apache.ldap";
 
     private ServiceRegistry registry;
@@ -55,7 +60,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache LDAP." );
+        log.debug( "Starting Apache LDAP." );
 
         tracker = new ServiceTracker( context, ServiceRegistry.class.getName(), null );
         tracker.open();
@@ -126,7 +131,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache LDAP." );
+        log.debug( "Stopping Apache LDAP." );
 
         registration.unregister();
         registration = null;

Modified: directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java (original)
+++ directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapConfig.java Mon
Sep  5 09:24:41 2005
@@ -20,8 +20,14 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class LdapConfig
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( LdapConfig.class );
+
     private static String SERVICE_PID = "service.pid";
 
     static String PID = "org.apache.ldap";
@@ -34,7 +40,7 @@
 
     public LdapConfig( Dictionary configuration )
     {
-        System.out.println( "Got props " + configuration );
+        log.debug( "Got props " + configuration );
 
         if ( configuration == null )
         {
@@ -43,7 +49,7 @@
 
         port = ( (Integer) configuration.get( LDAP_PORT_KEY ) ).intValue();
 
-        System.out.println( "LDAP got port " + port );
+        log.debug( "LDAP got port " + port );
     }
 
     boolean isDifferent( Dictionary config )
@@ -63,7 +69,7 @@
 
     int getPort()
     {
-        System.out.println( "Config returning " + port );
+        log.debug( "Config returning " + port );
 
         return port;
     }

Modified: directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java (original)
+++ directory/standalone/trunk/osgi/ldap/src/main/java/org/apache/ldap/LdapServer.java Mon
Sep  5 09:24:41 2005
@@ -25,9 +25,14 @@
 import org.apache.mina.protocol.ProtocolProvider;
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LdapServer
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( LdapServer.class );
+
     private ServiceRegistry registry;
     private ProtocolProvider provider;
     private Service tcpService;
@@ -54,7 +59,7 @@
 
         try
         {
-            System.out.println( name + " starting on " + port );
+            log.debug( name + " starting on " + port );
 
             provider = new LdapProtocolProvider( (Hashtable) env.clone() );
 
@@ -62,7 +67,7 @@
 
             registry.bind( tcpService, provider );
 
-            System.out.println( name + " listening on port " + port );
+            log.debug( name + " listening on port " + port );
         }
         catch ( Exception e )
         {
@@ -83,6 +88,6 @@
         provider = null;
         tcpService = null;
 
-        System.out.println( name + " has stopped listening on " + port );
+        log.debug( name + " has stopped listening on " + port );
     }
 }

Modified: directory/standalone/trunk/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
(original)
+++ directory/standalone/trunk/osgi/loader/src/main/java/org/apache/ldap/server/loader/Activator.java
Mon Sep  5 09:24:41 2005
@@ -29,10 +29,15 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.ungoverned.osgi.service.shell.Command;
 
 public class Activator implements BundleActivator, Command
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     private LdapContext ctx;
     private LdifFileLoader loader;
 
@@ -43,7 +48,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache Load Command." );
+        log.debug( "Starting Apache Load Command." );
 
         ServiceReference storeReference = context.getServiceReference( InitialContextFactory.class.getName()
);
 
@@ -70,7 +75,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache Load Command." );
+        log.debug( "Stopping Apache Load Command." );
 
         loader = null;
     }
@@ -101,7 +106,7 @@
         }
         else
         {
-            System.out.println( "Incorrect number of arguments:  load <path>" );
+            log.debug( "Incorrect number of arguments:  load <path>" );
         }
     }
 

Modified: directory/standalone/trunk/osgi/network/src/main/java/org/apache/mina/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/network/src/main/java/org/apache/mina/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/network/src/main/java/org/apache/mina/Activator.java (original)
+++ directory/standalone/trunk/osgi/network/src/main/java/org/apache/mina/Activator.java Mon
Sep  5 09:24:41 2005
@@ -25,9 +25,14 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     private ServiceRegistry registry;
     private ServiceRegistration registration;
 
@@ -38,7 +43,7 @@
      */
     public void start( BundleContext context ) throws BundleException
     {
-        System.out.println( "Starting Apache MINA Service Registry." );
+        log.debug( "Starting Apache MINA Service Registry." );
 
         registry = new SimpleServiceRegistry();
 
@@ -53,7 +58,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache MINA Service Registry." );
+        log.debug( "Stopping Apache MINA Service Registry." );
 
         registration.unregister();
         registration = null;

Modified: directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/Activator.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/Activator.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/Activator.java (original)
+++ directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/Activator.java Mon Sep
 5 09:24:41 2005
@@ -30,12 +30,17 @@
 import org.osgi.service.cm.ConfigurationException;
 import org.osgi.service.cm.ManagedServiceFactory;
 import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class implements a simple bundle that starts and stops the Apache NTP service.
  */
 public class Activator implements BundleActivator
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( Activator.class );
+
     public static final String FACTORY_PID = "org.apache.ntp";
 
     private ServiceRegistry registry;
@@ -50,7 +55,7 @@
      */
     public void start( BundleContext context )
     {
-        System.out.println( "Starting Apache NTP." );
+        log.debug( "Starting Apache NTP." );
 
         tracker = new ServiceTracker( context, ServiceRegistry.class.getName(), null );
         tracker.open();
@@ -111,7 +116,7 @@
      */
     public void stop( BundleContext context )
     {
-        System.out.println( "Stopping Apache NTP." );
+        log.debug( "Stopping Apache NTP." );
 
         registration.unregister();
         registration = null;

Modified: directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpConfig.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpConfig.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpConfig.java (original)
+++ directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpConfig.java Mon Sep
 5 09:24:41 2005
@@ -20,8 +20,14 @@
 import java.util.Dictionary;
 import java.util.Hashtable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public class NtpConfig
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( NtpConfig.class );
+
     private static String SERVICE_PID = "service.pid";
 
     static String PID = "org.apache.ntp";
@@ -33,7 +39,7 @@
 
     public NtpConfig( Dictionary configuration )
     {
-        System.out.println( "Got props " + configuration );
+        log.debug( "Got props " + configuration );
 
         if ( configuration == null )
         {
@@ -42,7 +48,7 @@
 
         port = ( (Integer) configuration.get( NTP_PORT_KEY ) ).intValue();
 
-        System.out.println( "NTP got port " + port );
+        log.debug( "NTP got port " + port );
     }
 
     boolean isDifferent( Dictionary config )
@@ -62,7 +68,7 @@
 
     int getPort()
     {
-        System.out.println( "Config returning " + port );
+        log.debug( "Config returning " + port );
 
         return port;
     }

Modified: directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpServer.java
URL: http://svn.apache.org/viewcvs/directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpServer.java?rev=278789&r1=278788&r2=278789&view=diff
==============================================================================
--- directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpServer.java (original)
+++ directory/standalone/trunk/osgi/ntp/src/main/java/org/apache/ntp/NtpServer.java Mon Sep
 5 09:24:41 2005
@@ -25,9 +25,14 @@
 import org.apache.mina.registry.Service;
 import org.apache.mina.registry.ServiceRegistry;
 import org.apache.ntp.protocol.NtpProtocolProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class NtpServer
 {
+    /** the log for this class */
+    private static final Logger log = LoggerFactory.getLogger( NtpServer.class );
+
     private ServiceRegistry registry;
     private ProtocolProvider provider;
     private Service tcpService;
@@ -53,7 +58,7 @@
 
         try
         {
-            System.out.println( name + " starting on " + port );
+            log.debug( name + " starting on " + port );
 
             provider = new NtpProtocolProvider();
 
@@ -63,7 +68,7 @@
             registry.bind( udpService, provider );
             registry.bind( tcpService, provider );
 
-            System.out.println( name + " listening on port " + port );
+            log.debug( name + " listening on port " + port );
         }
         catch ( IOException ioe )
         {
@@ -86,6 +91,6 @@
         udpService = null;
         tcpService = null;
 
-        System.out.println( name + " has stopped listening on " + port );
+        log.debug( name + " has stopped listening on " + port );
     }
 }



Mime
View raw message