Skip to content

Commit

Permalink
Closing ticket #585
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorklang committed Dec 21, 2010
1 parent b2dc5e0 commit 4f5084a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions akka-actor/src/main/scala/akka/config/Config.scala
Expand Up @@ -64,9 +64,19 @@ object Config extends Logging {
"\n\tdue to: " + e.toString)
}
Configgy.config
} else if (getClass.getClassLoader.getResource(confName) ne null) {
try {
Configgy.configureFromResource(confName, getClass.getClassLoader)
log.slf4j.info("Config [{}] loaded from the application classpath.",confName)
} catch {
case e: ParseException => throw new ConfigurationException(
"Can't load '" + confName + "' config file from application classpath," +
"\n\tdue to: " + e.toString)
}
Configgy.config
} else if (HOME.isDefined) {
try {
val configFile = HOME.getOrElse(throwNoAkkaHomeException) + "/config/" + confName
val configFile = HOME.get + "/config/" + confName
Configgy.configure(configFile)
log.slf4j.info(
"AKKA_HOME is defined as [{}], config loaded from [{}].",
Expand All @@ -79,16 +89,6 @@ object Config extends Logging {
"\n\tdue to: " + e.toString)
}
Configgy.config
} else if (getClass.getClassLoader.getResource(confName) ne null) {
try {
Configgy.configureFromResource(confName, getClass.getClassLoader)
log.slf4j.info("Config [{}] loaded from the application classpath.",confName)
} catch {
case e: ParseException => throw new ConfigurationException(
"Can't load '" + confName + "' config file from application classpath," +
"\n\tdue to: " + e.toString)
}
Configgy.config
} else {
log.slf4j.warn(
"\nCan't load '" + confName + "'." +
Expand Down

0 comments on commit 4f5084a

Please sign in to comment.