activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1234345 - in /activemq/activemq-apollo/trunk/apollo-cli/src: main/scala/org/apache/activemq/apollo/cli/Apollo.scala test/scala/org/apache/activemq/apollo/cli/TestApollo.scala
Date Sat, 21 Jan 2012 15:28:59 GMT
Author: chirino
Date: Sat Jan 21 15:28:59 2012
New Revision: 1234345

URL: http://svn.apache.org/viewvc?rev=1234345&view=rev
Log:
LevelDB Store import/export not working.

Added:
    activemq/activemq-apollo/trunk/apollo-cli/src/test/scala/org/apache/activemq/apollo/cli/TestApollo.scala
Modified:
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/Apollo.scala

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/Apollo.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/Apollo.scala?rev=1234345&r1=1234344&r2=1234345&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/Apollo.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/Apollo.scala
Sat Jan 21 15:28:59 2012
@@ -27,6 +27,8 @@ import org.apache.felix.gogo.runtime.Com
 import org.apache.activemq.apollo.util.FileSupport.RichFile._
 import java.util.logging.LogManager
 import java.io.{FileInputStream, File, PrintStream, InputStream}
+import org.apache.log4j.PropertyConfigurator
+import java.util.Properties
 
 /**
  * <p>
@@ -38,10 +40,10 @@ object Apollo {
   def main(args: Array[String]) = {
 
     if( System.getProperty("java.util.logging.config.file") == null ) {
-      val home = System.getProperty("apollo.home")
+      val home = System.getProperty("apollo.home", ".")
       var jul_config = new File(home) / "etc" / "jul.properties"
 
-      val base = System.getProperty("apollo.base")
+      val base = System.getProperty("apollo.base", ".")
       if ( base !=null ) {
         val file = new File(base) / "etc" / "jul.properties"
         if  ( file.exists()  ) {
@@ -49,11 +51,17 @@ object Apollo {
         }
       }
 
-      using(new FileInputStream(jul_config)) { is =>
-        LogManager.getLogManager.readConfiguration(is)
+      if( jul_config.exists() ) {
+        using(new FileInputStream(jul_config)) { is =>
+          LogManager.getLogManager.readConfiguration(is)
+        }
       }
     }
 
+    // Just in case your running a sub command an not
+    // the broker
+    PropertyConfigurator.configure(new Properties())
+
     Ansi.ansi()
     new Apollo().run(args)
   }

Added: activemq/activemq-apollo/trunk/apollo-cli/src/test/scala/org/apache/activemq/apollo/cli/TestApollo.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/test/scala/org/apache/activemq/apollo/cli/TestApollo.scala?rev=1234345&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/test/scala/org/apache/activemq/apollo/cli/TestApollo.scala
(added)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/test/scala/org/apache/activemq/apollo/cli/TestApollo.scala
Sat Jan 21 15:28:59 2012
@@ -0,0 +1,11 @@
+package org.apache.activemq.apollo.cli
+
+/**
+ * <p>
+ * </p>
+ *
+ * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
+ */
+object TestApollo {
+   def main(args: Array[String]) = Apollo.main(args)
+}
\ No newline at end of file



Mime
View raw message