Index: main/project.xml
===================================================================
--- main/project.xml (revision 201825)
+++ main/project.xml (working copy)
@@ -148,8 +148,13 @@
1.2.1
http://www.springframework.com/
+
+ log4j
+ log4j
+ 1.2.8
+
+
-
maven-changes-plugin
maven-tasklist-plugin
Index: main/maven.xml
===================================================================
--- main/maven.xml (revision 201825)
+++ main/maven.xml (working copy)
@@ -11,6 +11,10 @@
+
+
+
+
Index: main/src/main/java/org/apache/ldap/server/ServerMain.java
===================================================================
--- main/src/main/java/org/apache/ldap/server/ServerMain.java (revision 201825)
+++ main/src/main/java/org/apache/ldap/server/ServerMain.java (working copy)
@@ -26,6 +26,7 @@
import org.apache.ldap.server.configuration.ServerStartupConfiguration;
import org.apache.ldap.server.configuration.SyncConfiguration;
import org.apache.ldap.server.jndi.ServerContextFactory;
+import org.apache.log4j.Category;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
@@ -39,6 +40,8 @@
*/
public class ServerMain
{
+ private static Category log = Category.getInstance(ServerMain.class);
+
/**
* Takes a single argument, an optional properties file to load with server
* startup settings.
@@ -52,15 +55,16 @@
ServerStartupConfiguration cfg;
if ( args.length > 0 )
- {
- System.out.println( "server: loading settings from " + args[0] );
+ {
+ log.info("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( "Using default settings ..." );
env = new Properties();
cfg = new MutableServerStartupConfiguration();
}
@@ -71,7 +75,7 @@
new InitialDirContext( env );
- System.out.println( "server: started in "
+ log.info( "Started in "
+ ( System.currentTimeMillis() - startTime )
+ " milliseconds");
Index: project.xml
===================================================================
--- project.xml (revision 201825)
+++ project.xml (working copy)
@@ -70,12 +70,19 @@
+
+
+
+ junit
+ 3.8.1
+
Index: shared/project.xml
===================================================================
--- shared/project.xml (revision 201825)
+++ shared/project.xml (working copy)
@@ -18,6 +18,12 @@
ldap-common
0.9.1-SNAPSHOT
+
+
+ log4j
+ log4j
+ 1.2.8
+
Index: core/maven.xml
===================================================================
--- core/maven.xml (revision 201825)
+++ core/maven.xml (working copy)
@@ -17,5 +17,10 @@
-
+
+
+
+
+
+
Index: core/project.xml
===================================================================
--- core/project.xml (revision 201825)
+++ core/project.xml (working copy)
@@ -105,6 +105,11 @@
mina
0.7.3-SNAPSHOT
+
+ log4j
+ log4j
+ 1.2.8
+
Index: core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java
===================================================================
--- core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java (revision 201825)
+++ core/src/main/java/org/apache/ldap/server/configuration/StartupConfiguration.java (working copy)
@@ -22,7 +22,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.List;
+import java.util.List;
import java.util.Set;
import javax.naming.directory.Attributes;
Index: core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java
===================================================================
--- core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java (revision 201825)
+++ core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/MainFrame.java (working copy)
@@ -74,6 +74,7 @@
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.apache.log4j.Category;
/**
@@ -85,6 +86,7 @@
public class MainFrame extends JFrame
{
private static final long serialVersionUID = 4049353102291513657L;
+ private static final Category log = Category.getInstance(MainFrame.class);
// Swing Stuff
private JLabel statusBar = new JLabel( "Ready" );
@@ -301,7 +303,7 @@
{
public void actionPerformed( ActionEvent an_event )
{
- System.out.println( "action command = "
+ log.debug( "action command = "
+ an_event.getActionCommand() );
try
{
@@ -606,7 +608,7 @@
String limit )
throws Exception
{
- System.out.println( "Search attempt using filter '" + filter + "' "
+ log.debug( "Search attempt using filter '" + filter + "' "
+ "with scope '" + scope + "' and a return limit of '" + limit
+ "'" );
FilterParser parser = new FilterParserImpl();
@@ -712,7 +714,7 @@
public void doDebug( String filter, String scope, String base,
String limit )
{
- System.out.println( "Search attempt using filter '" + filter + "' "
+ log.debug( "Search attempt using filter '" + filter + "' "
+ "with scope '" + scope + "' and a return limit of '" + limit
+ "'" );
}
Index: core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java
===================================================================
--- core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java (revision 201825)
+++ core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/IndexDialog.java (working copy)
@@ -42,6 +42,7 @@
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.apache.log4j.Category;
/**
@@ -53,6 +54,7 @@
public class IndexDialog extends JDialog
{
private static final long serialVersionUID = 3689917253680445238L;
+ private static final Category log = Category.getInstance(IndexDialog.class);
public static final String DEFAULT_CURSOR = "Default" ;
public static final String EQUALITY_CURSOR = "Equality" ;
Index: core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java
===================================================================
--- core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java (revision 201825)
+++ core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/AddEntryDialog.java (working copy)
@@ -38,6 +38,7 @@
import javax.swing.JTextField;
import org.apache.ldap.common.message.LockableAttributesImpl;
+import org.apache.log4j.Category;
/**
@@ -49,6 +50,7 @@
public class AddEntryDialog extends JDialog implements ActionListener
{
private static final long serialVersionUID = 3544671793504663604L;
+ private static final Category log = Category.getInstance(AddEntryDialog.class);
private JPanel m_namePnl = new JPanel();
private JPanel m_attrPnl = new JPanel();
@@ -283,7 +285,7 @@
//to return an Integer, not a String:
public Object getCellEditorValue()
{
- System.out.println( "Editor returning '" + l_textField.getText()
+ log.debug( "Editor returning '" + l_textField.getText()
+ "'" );
return l_textField.getText();
}
@@ -324,7 +326,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: core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java
===================================================================
--- core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java (revision 201825)
+++ core/src/main/java/org/apache/ldap/server/partition/impl/btree/gui/PartitionViewer.java (working copy)
@@ -24,6 +24,7 @@
import org.apache.ldap.server.partition.impl.btree.BTreeContextPartition;
import org.apache.ldap.server.partition.impl.btree.SearchEngine;
+import org.apache.log4j.Category;
/**
@@ -34,6 +35,8 @@
*/
public class PartitionViewer
{
+ private static final Category log = Category.getInstance(PartitionViewer.class);
+
/** A handle on the atomic partition */
private BTreeContextPartition partition;
private SearchEngine eng;
@@ -93,6 +96,6 @@
( screenSize.height - frameSize.height ) / 2) ;
frame.setVisible( true );
- System.out.println( frameSize ) ;
+ log.debug(frameSize);
}
}