Question

I have a maven webapp project imported into eclipse 3.4 with logback(1.0.9) logging. There is:

  • src/main/resources/logback.xml
  • src/test/resources/logback-test.xml

When I launch the webapp in Tomcat, because of the order Logback finds the configuration file, logback-test.xml is always loaded. I want the logback.xml to be loaded, instead, for the application launch and use the logback-test.xml only for the test classes.

How can I achieve that?

Was it helpful?

Solution

The issue was improper configuration of the locations for deployment into Tomcat. This can be configured in Eclipse from

Project Properties > Deployment Assembly

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top