Skip to content

Commit

Permalink
Fix #534 (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii authored and Renato Cavalcanti committed Jul 18, 2017
1 parent 091c757 commit cb5f07b
Showing 1 changed file with 20 additions and 3 deletions.
Expand Up @@ -70,9 +70,13 @@ abstract class LagomApplicationLoader extends ApplicationLoader with ServiceDisc
*
* It also wraps the Play specific types in Lagom types.
*/
override final def load(context: Context): Application = context.environment.mode match {
case Mode.Dev => loadDevMode(LagomApplicationContext(context)).application
case _ => load(LagomApplicationContext(context)).application
override final def load(context: Context): Application = {
val environment = context.environment
loadCustomLoggerConfiguration(environment)
environment.mode match {
case Mode.Dev => loadDevMode(LagomApplicationContext(context)).application
case _ => load(LagomApplicationContext(context)).application
}
}

/**
Expand Down Expand Up @@ -154,6 +158,19 @@ abstract class LagomApplicationLoader extends ApplicationLoader with ServiceDisc
}.asInstanceOf[ServiceDescription]
}
}

/**
* Fix for https://github.com/lagom/lagom/issues/534
*
* @param environment
*/
private def loadCustomLoggerConfiguration(environment: Environment) = {
LoggerConfigurator(environment.classLoader).foreach {
_.configure(environment)
}
}


}

/**
Expand Down

0 comments on commit cb5f07b

Please sign in to comment.