Is a single logback.xml file for multiple applications a good practice?

java, logback, slf4j, tomcat, web-applications

Solution

Unfortunately there's the requirement now to log every application to it's own file.

I think, that this is the only correct way to do it. It is ok to have several log files for single application, but to have many applications writing in the same log is bad practice.

Problem

There are multiple applications deployed on my Tomcat server. At first everyone had it's one `logback.xml` file packaged in `WEB-INF/classes` with it. Then I've put another directory outside the Tomcat's deploy directory on the common classpath, put a single `logback.xml` there and excluded the other ones from the applications. The reason for that was that I wanted logging to be conveniently configurable in one place. Unfortunately there's the requirement now to log every application to it's own file. Since I think that this is not so easy to achieve with this setup, I'm wondering whether this setup is that good at all. What do you think?

Original source