Index: apacheds/trunk/main/project.xml =================================================================== --- apacheds/trunk/main/project.xml (revision 225248) +++ apacheds/trunk/main/project.xml (working copy) @@ -11,6 +11,16 @@ be used as the JNDI provider or to fire up the standalone directory server. + + src/main/java + + + src/etc + log4j.properties + + + + Index: apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java =================================================================== --- apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java (revision 225248) +++ apacheds/trunk/main/src/main/java/org/apache/ldap/server/ServerMain.java (working copy) @@ -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 ) { Index: apacheds/trunk/project.xml =================================================================== --- apacheds/trunk/project.xml (revision 225248) +++ apacheds/trunk/project.xml (working copy) @@ -76,6 +76,12 @@ 3.8.1 http://junit.org + + org.slf4j + nlog4j + 1.2.14 + http://slf4j.org/nlog4j + Index: apacheds/trunk/core/project.properties =================================================================== --- apacheds/trunk/core/project.properties (revision 225248) +++ apacheds/trunk/core/project.properties (working copy) @@ -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 @@ -28,6 +28,8 @@ maven.ldap.server.schema.deps.system= maven.ldap.server.schema.deps.dhcp=system,core maven.ldap.server.schema.deps.samba=cosine,inetorg,nis +maven.ldap.server.schema.deps.atlassian=system +maven.ldap.server.schema.package.atlassian=com.atlassian.user.ldap.schema maven.license.licenseFile=${basedir}/../LICENSE.txt Index: apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java =================================================================== --- apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java (revision 225248) +++ apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java (working copy) @@ -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 + "'" ); + } } Index: apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java =================================================================== --- apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java (revision 225248) +++ apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java (working copy) @@ -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 Index: apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java =================================================================== --- apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java (revision 225248) +++ apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java (working copy) @@ -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 ) { Index: apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java =================================================================== --- apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java (revision 225248) +++ apacheds/trunk/core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java (working copy) @@ -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 + "") ; } }