There are several ways of reading configuration files in Scala including the java properties way with the deprecated Configgy and quite some more. One way which is easy and comes in handy is with the Typesafe Config project which is also used in Akka.
Let us quickly see how to set it up,
You would need to include the following dependency in your build.sbt or Build.scala.
Once you have this, setting up the logger is straight forward. The snippet in our case is
The ConfigFactory.load by default looks for the following files in order
*application.conf (all resources on classpath with this name)
*application.json (all resources on classpath with this name)
*application.properties (all resources on classpath with this name)
*reference.conf (all resources on classpath with this name)
You could also load it with a different file using ConfigFactory.load(file-name), like when you would want to execute tests.
and the configuration file would look like this
As you would notice, we can access the subsections. Let us see it through a test
More details on the project here