The link here shows you how to configure your custom logger.
https://www.playframework.com/documentation/2.4.x/SettingsLogger
I was just wondering where is the ${applicaation.home} defined, as it seems to not have been defined in my production environment.
As indicated by @user316607, Play should define application.home
by itself in the Logger.configure method. If you are seeing the value application.home_IS_UNDEFINED
instead, and you're using compile-time dependency injection, you'll need to call Logger.configure
yourself in your ApplicationLoader
as explained in this blog post:
class MyApplicationLoader extends ApplicationLoader {
def load(context: Context) = {
new MyComponents(context).application
}
}
class MyComponents(context: Context) extends BuiltInComponentsFromContext(context) {
// You have to call Logger.configure manually or logback won't work
Logger.configure(context.environment)
// ... The rest of your app initialization code ...
}
I feel stupid. I just realised that it's part of logback and not part of play. You can define your own variables like thus:
<property name="USER_HOME" value="/home/sebastien" />
Checkout link here for more details: http://logback.qos.ch/manual/configuration.html#definingProps
appliation.home is defined by play framework itself.
https://github.com/playframework/playframework/blob/2.4.x/framework/src/play/src/main/scala/play/api/Logger.scala#L199
You must have another problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With