app/AppLoader.scala (13 lines of code) (raw):
import play.api.{Application, ApplicationLoader, LoggerConfigurator}
import play.api.ApplicationLoader.Context
class AppLoader extends ApplicationLoader {
override def load(context: Context): Application = {
startLogging(context)
new AppComponents(context).application
}
private def startLogging(context: Context): Unit = {
LoggerConfigurator(context.environment.classLoader).foreach {
_.configure(context.environment)
}
}
}