Print more logging info while starting up
authorChristos KK Loverdos <loverdos@gmail.com>
Fri, 1 Jun 2012 12:36:38 +0000 (15:36 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Fri, 1 Jun 2012 12:36:38 +0000 (15:36 +0300)
src/main/scala/gr/grnet/aquarium/Aquarium.scala
src/main/scala/gr/grnet/aquarium/Main.scala
src/main/scala/gr/grnet/aquarium/ResourceLocator.scala

index 6e96df5..a683a3d 100644 (file)
@@ -314,8 +314,9 @@ final class Aquarium(val props: Props) extends Lifecycle with Loggable {
       logger.info("{} = {}", prop.name, prop.rawValue)
     }
 
-
-    logger.info("CONF_HERE = {}", CONF_HERE)
+    logger.info("CONF_HERE =  {}", HERE)
+    logger.info("{} = {}", ResourceLocator.ResourceNames.LOGBACK_XML, LOGBACK_XML)
+    logger.info("{} = {}", ResourceLocator.ResourceNames.AQUARIUM_PROPERTIES, ResourceLocator.Resources.AquariumPropertiesResource)
   }
 
   private[this] def addShutdownHooks(): Unit = {
index 2cc7844..02656b1 100644 (file)
@@ -37,11 +37,11 @@ package gr.grnet.aquarium
 
 import gr.grnet.aquarium.util.date.TimeHelpers
 import gr.grnet.aquarium.util.LazyLoggable
+import gr.grnet.aquarium.ResourceLocator._
 
 /**
  * Main method for Aquarium
  *
- * @author Georgios Gousios <gousiosg@gmail.com>
  * @author Christos KK Loverdos <loverdos@gmail.com>
  */
 object Main extends LazyLoggable {
index 80878f2..ed60433 100644 (file)
@@ -198,12 +198,15 @@ object ResourceLocator {
 
   final lazy val AQUARIUM_HOME_CONF_FOLDER = new File(Homes.Folders.AquariumHome, ResourceNames.CONF_FODLER)
 
-  final lazy val LOGBACK_XML_FILE = new File(AQUARIUM_HOME_CONF_FOLDER, ResourceNames.LOGBACK_XML)
+  /**
+   * This exists in order to have a feeling of where we are.
+   */
+  final lazy val HERE = justForSure(getResource(".")).get.url.toExternalForm
 
   /**
    * This exists in order to have a feeling of where we are.
    */
-  final lazy val CONF_HERE = justForSure(getResource(".")).get.url.toExternalForm
+  final lazy val LOGBACK_XML = getResource(ResourceNames.LOGBACK_XML).getOr(null)
 
   final object Resources {
     final lazy val AquariumPropertiesResource = {
@@ -215,10 +218,7 @@ object ResourceLocator {
         case Failed(e) ⇒
           // On error, fail
           throw new AquariumInternalError(
-            "Could not find %s=%s".format(
-              ResourceLocator.SysProps.Names.AquariumPropertiesPath,
-              ResourceLocator.SysProps.Names.AquariumPropertiesPath),
-            e)
+            "Could not find %s".format(ResourceLocator.SysProps.Names.AquariumPropertiesPath), e)
 
         case NoVal ⇒
           // Otherwise try other locations