[logback-user] multiple apps deployed in Tomcat

Ceki Gülcü ceki at qos.ch
Mon May 30 22:23:51 CEST 2011

On 30/05/2011 3:10 PM, Nathaniel Auvil wrote:
> I want to deploy multiple applications in Tomcat. Each one will include
> Logback jars. I need to have the log configuration file external to the
> war so i can change them on the fly.  Is the "best" way to do this to
> have an init servlet in each application which loads from the
> filesystem?  I can pass a system property on Tomcat startup which points
> to a "config" directory.

Hello Nathaniel,

You could include an external configuration file on a path dependent on 
the application. Example:

-- contents of logback.xml shipping within myApp1, one of your web-apps

<configuration scan="true">
   <include file="/a/path/myApp1/logback.xml"/>

Auto scan feature is documented at

-- contents of /a/path/myApp1/logback.xml

   ... other content

File inclusion is documented at

Note that logback will scan for changes in included files as well.


QOS.ch, main sponsor of cal10n, logback and slf4j open source projects, 
is looking to hire talented software developers. For further details, 
see http://logback.qos.ch/job.html

More information about the Logback-user mailing list