directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r653727 - in /directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main: java/org/apache/directory/studio/apacheds/experimentations/ java/org/apache/directory/studio/apacheds/experimentations/jobs/ resour...
Date Tue, 06 May 2008 09:56:55 GMT
Author: pamarcelot
Date: Tue May  6 02:56:53 2008
New Revision: 653727

URL: http://svn.apache.org/viewvc?rev=653727&view=rev
Log:
Fixed the launching of the Server within the launch configuration (log4j configuration now
works well).

Modified:
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPlugin.java
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/StudioConsoleAppender.java
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/resources/log4j.properties

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPlugin.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPlugin.java?rev=653727&r1=653726&r2=653727&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPlugin.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPlugin.java
Tue May  6 02:56:53 2008
@@ -93,8 +93,12 @@
         ApacheDsPluginUtils.verifyLibrariesFolder();
 
         // Configuring Log4J
-        PropertyConfigurator.configure( Platform.getBundle( PLUGIN_ID ).getResource( "conf/log4j.properties"
) ); //$NON-NLS-1$
-        logger.info( "Entering Apache Directory Studio." ); //$NON-NLS-1$
+//        PropertyConfigurator.configure( Platform.getBundle( PLUGIN_ID ).getResource( "log4j.properties"
) ); //$NON-NLS-1$
+        logger.info( "Sending INFO Message..." ); //$NON-NLS-1$
+        logger.debug( "Sending DEBUG Message..." ); //$NON-NLS-1$
+        logger.warn( "Sending WARN Message..." ); //$NON-NLS-1$
+        logger.error( "Sending ERROR Message..." ); //$NON-NLS-1$
+        logger.fatal( "Sending FATAL Message..." ); //$NON-NLS-1$
     }
 
 

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/StudioConsoleAppender.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/StudioConsoleAppender.java?rev=653727&r1=653726&r2=653727&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/StudioConsoleAppender.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/StudioConsoleAppender.java
Tue May  6 02:56:53 2008
@@ -34,6 +34,11 @@
  */
 public class StudioConsoleAppender extends AppenderSkeleton
 {
+    public StudioConsoleAppender()
+    {
+        System.out.println( "Create Logger");
+    }
+    
     /* (non-Javadoc)
      * @see org.apache.log4j.AppenderSkeleton#append(org.apache.log4j.spi.LoggingEvent)
      */

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java?rev=653727&r1=653726&r2=653727&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
Tue May  6 02:56:53 2008
@@ -42,6 +42,8 @@
 import org.eclipse.jdt.launching.IVMInstall;
 import org.eclipse.jdt.launching.JavaRuntime;
 
+import com.sun.org.apache.xpath.internal.Arg;
+
 
 /**
  * This class implements a {@link Job} that is used to launch a server instance.
@@ -70,7 +72,7 @@
      */
     protected IStatus run( IProgressMonitor monitor )
     {
-        setName( serverInstance.getName() );
+        setName( "Starting " + serverInstance.getName() );
 
         IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
 
@@ -120,23 +122,24 @@
         IPath instancesFolderPath = ApacheDsPluginUtils.getApacheDsInstancesFolder();
         IPath instanceFolderPath = instancesFolderPath.append( serverInstance.getId() );
 
-        StringBuffer arguments = new StringBuffer();
-        arguments.append( instanceFolderPath.append( "conf" ).append( "server.xml" ).toOSString()
);
-        arguments.append( " " );
-        arguments.append( "-Dlog4j.configuration="
+        workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
instanceFolderPath.append(
+            "conf" ).append( "server.xml" ).toOSString() );
+
+        StringBuffer vmArguments = new StringBuffer();
+        vmArguments.append( "-Dlog4j.configuration=file:"
             + instanceFolderPath.append( "conf" ).append( "log4j.properties" ).toOSString()
);
-        arguments.append( " " );
-        arguments.append( "-Dapacheds.var.dir=" + instanceFolderPath.toOSString() );
-        arguments.append( " " );
-        arguments.append( "-Dapacheds.log.dir=" + instanceFolderPath.append( "log" ).toOSString()
);
-        arguments.append( " " );
-        arguments.append( "-Dapacheds.run.dir=" + instanceFolderPath.append( "run" ).toOSString()
);
-        arguments.append( " " );
-        arguments.append( "-Dapacheds.instance=" + serverInstance.getName() );
+        vmArguments.append( " " );
+        vmArguments.append( "-Dapacheds.var.dir=" + instanceFolderPath.toOSString() );
+        vmArguments.append( " " );
+        vmArguments.append( "-Dapacheds.log.dir=" + instanceFolderPath.append( "log" ).toOSString()
);
+        vmArguments.append( " " );
+        vmArguments.append( "-Dapacheds.run.dir=" + instanceFolderPath.append( "run" ).toOSString()
);
+        vmArguments.append( " " );
+        vmArguments.append( "-Dapacheds.instance=" + serverInstance.getName() );
 
-        System.err.println( arguments.toString() );
+        System.err.println( vmArguments.toString() );
 
-        workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
arguments.toString() );
+        workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArguments.toString()
);
 
         ILaunchConfiguration configuration = null;
         try

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/resources/log4j.properties?rev=653727&r1=653726&r2=653727&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/resources/log4j.properties
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/resources/log4j.properties
Tue May  6 02:56:53 2008
@@ -1,3 +1,3 @@
 log4j.appender.mylog=org.apache.directory.studio.apacheds.experimentations.StudioConsoleAppender
 
-log4j.rootCategory=WARN, mylog
\ No newline at end of file
+log4j.rootCategory=INFO, mylog
\ No newline at end of file



Mime
View raw message