playframework/playframework — pull request #1448 by jroper (2014-08-21 06:28:42+00:00)
Title: logback init flow not working as expected because of play's logger.xml

play framework uses logger.xml.
logback uses logback.xml.

Play will always load logger.xml (even it's bundled one) and this messes up the init steps logback uses in some cases.

Please either rename logger.xml to logback.xml or give precedence to a logback.xml if it's present.

I stumbled on this while wanting to use logback-test.xml for testing as per the logback documentation. It was kind of annoying that it didn't work as expected because of play's logger.xml...

There are ways to overcome this issue but It's kinda annoying and counter productive that play uses logback for logging but does not adhere fully to it's convention.

from: http://logback.qos.ch/manual/configuration.html

Let us begin by discussing the initialization steps that logback follows to try to configure itself:
Logback tries to find a file called logback.groovy in the classpath.
If no such file is found, logback tries to find a file called logback-test.xml in the classpath.
If no such file is found, it checks for the file logback.xml in the classpath..
If neither file is found, logback configures itself automatically using the BasicConfigurator which will cause logging output to be directed to the console.