[Play 2.1.1] custom logback configuration property "logger.resource" not working

264 views
Skip to first unread message

diegovarese

unread,
Apr 5, 2013, 5:19:12 PM4/5/13
to play-fr...@googlegroups.com
I'm specifying the logger.resource system property to be "local-logger.xml", which is a file in the conf folder. However, I get the following error when I attempt to run the Play app:

18:01:37,654 |-ERROR in ch.qos.logback.classic.joran.JoranConfigurator@25e7782e - Could not open URL [file:/local-logger.xml]. java.io.FileNotFoundException: \local-logger.xml (The system cannot find the file specified)
        at java.io.FileNotFoundException: \local-logger.xml (The system cannot find the file specified)
        at      at java.io.FileInputStream.open(Native Method)
        at      at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at      at java.io.FileInputStream.<init>(FileInputStream.java:97)
        at      at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
        at      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
        at      at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:55)
        at      at play.api.Logger$$anonfun$configure$8.apply(Logger.scala:248)
        at      at play.api.Logger$$anonfun$configure$8.apply(Logger.scala:247)
        at      at scala.Option.map(Option.scala:145)
        at      at play.api.Logger$.configure(Logger.scala:247)
        at      at play.core.server.Server$class.$init$(Server.scala:39)
        ...............

I've debugged and apparently the line that attempts to find the resource fails, which is:

Line 237 in Logger.scala
this.getClass.getClassLoader.getResource(r)

It appears as if the classloader at that point doesn't include the resources in the conf file. This used to work in play 2.0.x, can somebody verify if this is the case?


Thanks

Diego



diegovarese

unread,
Sep 24, 2013, 11:47:02 AM9/24/13
to play-fr...@googlegroups.com
I'm bumping this as it's still not working in Play 2.1.5.
Reply all
Reply to author
Forward
0 new messages