directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r225440 - in /directory/apacheds/trunk: ./ core/ core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/ main/ main/src/main/java/org/apache/ldap/server/ main/src/main/resources/
Date Wed, 27 Jul 2005 01:06:33 GMT
Author: akarasulu
Date: Tue Jul 26 18:06:25 2005
New Revision: 225440

URL: http://svn.apache.org/viewcvs?rev=225440&view=rev
Log:
changes ...

 o patched using http://issues.apache.org/jira/secure/attachment/12311395/logging_patch_3.txt
from Nick Faiz' contrib in DIREVE-171
 o now we're using a combination of NLOG4J/SLF4J and commons logging this 
   should however change so commons logging is no longer present
 o removed reference to atlassian schema
 o moved ${basedir}/src/etc -> ${basedir}/src/main/resources where the log4j.properties
sit


Added:
    directory/apacheds/trunk/main/src/main/resources/
    directory/apacheds/trunk/main/src/main/resources/log4j.properties
Modified:
    directory/apacheds/trunk/core/project.properties
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java
    directory/apacheds/trunk/main/project.xml
    directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java
    directory/apacheds/trunk/project.xml

Modified: directory/apacheds/trunk/core/project.properties
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/project.properties?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/core/project.properties (original)
+++ directory/apacheds/trunk/core/project.properties Tue Jul 26 18:06:25 2005
@@ -13,7 +13,7 @@
 # schema class generation
 # =======================
 
-maven.ldap.server.schemas=apachedns,autofs,core,cosine,corba,apache,inetorgperson,java,krb5kdc,nis,system,dhcp,samba
+maven.ldap.server.schemas=apachedns,atlassian,autofs,core,cosine,corba,apache,inetorgperson,java,krb5kdc,nis,system,dhcp,samba
 
 maven.ldap.server.schema.deps.apachedns=system,core
 maven.ldap.server.schema.deps.autofs=system,core,cosine

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java
Tue Jul 26 18:06:25 2005
@@ -38,6 +38,8 @@
 import javax.swing.JTextField;
 
 import org.apache.ldap.common.message.LockableAttributesImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -48,6 +50,8 @@
  */
 public class AddEntryDialog extends JDialog implements ActionListener
 {
+    private static final Logger log = LoggerFactory.getLogger(AddEntryDialog.class);
+
     private static final long serialVersionUID = 3544671793504663604L;
 
     private JPanel m_namePnl = new JPanel();
@@ -283,8 +287,8 @@
             //to return an Integer, not a String:
             public Object getCellEditorValue() 
             {
-                System.out.println( "Editor returning '" + l_textField.getText()
-                    + "'" );
+                if (log.isDebugEnabled())
+                    log.debug( "Editor returning '" + l_textField.getText() + "'" );
                 return l_textField.getText();
             }
         };
@@ -324,7 +328,7 @@
         AttributesTableModel l_model = ( AttributesTableModel ) 
             m_attrTbl.getModel();
         int l_row = m_attrTbl.getSelectedRow();
-        System.out.println( l_cmd );
+        log.debug( l_cmd );
         
         if ( l_row >= l_model.getRowCount() || l_row < 0 )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java
Tue Jul 26 18:06:25 2005
@@ -42,6 +42,8 @@
 import org.apache.ldap.server.partition.impl.btree.Index;
 import org.apache.ldap.server.partition.impl.btree.IndexRecord;
 import org.apache.regexp.RE;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -52,6 +54,8 @@
  */
 public class IndexDialog extends JDialog
 {
+    private static final Logger log = LoggerFactory.getLogger(IndexDialog.class);
+
     private static final long serialVersionUID = 3689917253680445238L;
 
     public static final String DEFAULT_CURSOR = "Default" ;
@@ -322,7 +326,10 @@
                 if ( l_starIndex > 0 ) 
                 {
                     String l_prefix = a_key.substring( 0, l_starIndex ) ;
-                    System.out.println( "Regex prefix = " + l_prefix ) ;
+
+                    if (log.isDebugEnabled())
+                        log.debug( "Regex prefix = " + l_prefix ) ;
+
                     l_list = m_index.listIndices( l_regex, l_prefix ) ;
                 } 
                 else 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java
Tue Jul 26 18:06:25 2005
@@ -74,6 +74,8 @@
 import org.apache.ldap.server.partition.impl.btree.Index;
 import org.apache.ldap.server.partition.impl.btree.IndexRecord;
 import org.apache.ldap.server.partition.impl.btree.SearchEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -84,6 +86,8 @@
  */
 public class MainFrame extends JFrame
 {
+    private static final Logger log = LoggerFactory.getLogger(MainFrame.class);
+
     private static final long serialVersionUID = 4049353102291513657L;
 
     // Swing Stuff
@@ -301,8 +305,9 @@
         {
             public void actionPerformed( ActionEvent an_event ) 
             {
-                System.out.println( "action command = " 
-                    + an_event.getActionCommand() );
+                if (log.isDebugEnabled())
+                    log.debug( "action command = " + an_event.getActionCommand() );
+
                 try
                 {
                     doFilterDialog( an_event.getActionCommand() );
@@ -606,9 +611,13 @@
         String limit )
         throws Exception
     {
-        System.out.println( "Search attempt using filter '" + filter + "' "
+        if (log.isDebugEnabled())
+        {
+            log.debug( "Search attempt using filter '" + filter + "' "
             + "with scope '" + scope + "' and a return limit of '" + limit
             + "'" );
+        }
+
         FilterParser parser = new FilterParserImpl();
         ExprNode root = null;
 
@@ -712,9 +721,12 @@
     public void doDebug( String filter, String scope, String base,
         String limit )
     {
-        System.out.println( "Search attempt using filter '" + filter + "' "
+        if (log.isDebugEnabled())
+        {
+            log.debug( "Search attempt using filter '" + filter + "' "
             + "with scope '" + scope + "' and a return limit of '" + limit
             + "'" );
+        }
     }
 
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java
Tue Jul 26 18:06:25 2005
@@ -24,6 +24,8 @@
 
 import org.apache.ldap.server.partition.impl.btree.BTreeContextPartition;
 import org.apache.ldap.server.partition.impl.btree.SearchEngine;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -34,6 +36,8 @@
  */
 public class PartitionViewer
 {
+    private static final Logger log = LoggerFactory.getLogger(PartitionViewer.class);
+
     /** A handle on the atomic partition */
     private BTreeContextPartition partition;
     private SearchEngine eng;
@@ -93,6 +97,6 @@
             ( screenSize.height - frameSize.height ) / 2) ;
 
         frame.setVisible( true );
-        System.out.println( frameSize ) ;
+        log.debug( frameSize + "") ;
     }
 }

Modified: directory/apacheds/trunk/main/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/project.xml?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/main/project.xml (original)
+++ directory/apacheds/trunk/main/project.xml Tue Jul 26 18:06:25 2005
@@ -11,6 +11,16 @@
     be used as the JNDI provider or to fire up the standalone directory server.
   </description>
 
+  <build>
+      <sourceDirectory>src/main/java</sourceDirectory>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>log4j.properties</includes>
+            </resource>
+        </resources>
+  </build>
+
   <!-- Need to have all dependencies here so appjar bundles them -->
 
   <dependencies>

Modified: directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java (original)
+++ directory/apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java Tue
Jul 26 18:06:25 2005
@@ -28,6 +28,8 @@
 import org.apache.ldap.server.jndi.ServerContextFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
 
 
 /**
@@ -39,6 +41,8 @@
  */
 public class ServerMain
 {
+    private static final Logger log = LoggerFactory.getLogger(ServerMain.class);
+    
     /**
      * Takes a single argument, an optional properties file to load with server
      * startup settings.
@@ -53,14 +57,14 @@
 
         if ( args.length > 0 )
         {
-            System.out.println( "server: loading settings from " + args[0] );
+            log.info( "server: loading settings from " + args[0] );
             ApplicationContext factory = new FileSystemXmlApplicationContext( args[0] );
             cfg = ( ServerStartupConfiguration ) factory.getBean( "configuration" );
             env = ( Properties ) factory.getBean( "environment" );
         }
         else
         {
-            System.out.println( "server: using default settings ..." );
+            log.info( "server: using default settings ..." );
             env = new Properties();
             cfg = new MutableServerStartupConfiguration();
         }
@@ -71,9 +75,11 @@
 
         new InitialDirContext( env );
 
-        System.out.println( "server: started in "
-                + ( System.currentTimeMillis() - startTime )
-                + " milliseconds");
+        if (log.isInfoEnabled())
+        {
+            log.info( "server: started in " + ( System.currentTimeMillis() - startTime )
+                    + " milliseconds");
+        }
 
         while ( true )
         {

Added: directory/apacheds/trunk/main/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/main/src/main/resources/log4j.properties?rev=225440&view=auto
==============================================================================
--- directory/apacheds/trunk/main/src/main/resources/log4j.properties (added)
+++ directory/apacheds/trunk/main/src/main/resources/log4j.properties Tue Jul 26 18:06:25
2005
@@ -0,0 +1,5 @@
+log4j.rootCategory=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n

Modified: directory/apacheds/trunk/project.xml
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/project.xml?rev=225440&r1=225439&r2=225440&view=diff
==============================================================================
--- directory/apacheds/trunk/project.xml (original)
+++ directory/apacheds/trunk/project.xml Tue Jul 26 18:06:25 2005
@@ -76,6 +76,12 @@
         <version>3.8.1</version>
         <url>http://junit.org</url>
       </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>nlog4j</artifactId>
+        <version>1.2.14</version>
+        <url>http://slf4j.org/nlog4j</url>
+      </dependency>
     </dependencies>        
   
     <build>



Mime
View raw message