Drive tests typically include the entire project in the classpath, including configuration files, among them the logback.xml
.
It turns out that the unit test log settings are usually different from the project’s log configuration for production. A simple way to resolve this is to put the file logback-test.xml
in the unit test classpath. This way, Logback will know when to choose the correct configuration file and the name will make it clear if you are using the production file (logback.xml
) or the test (logback-test.xml
).