tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Mikusa <>
Subject Re: In Tomcat JULI, do the 'facility specific' loggers become per-webapp logger roots?
Date Wed, 09 Oct 2013 11:24:57 GMT
On Oct 8, 2013, at 11:03 PM, David Bullock <> wrote:

> Please answer at Stackoverflow, and I'll report the results back to this
> list:

If you want to control your application's logging with the "org.apache.catalina.core.ContainerBase.[${engine}].[${host}].[${context}]"
options in "conf/" then the application needs to use the Servlet logging
api.  See here for more details.

In general, I don't think most web application's will want to use this mechanism for logging
though.  Rather they'd use something more modern like Log4j or Logback (possibly through SLF4J)
which each have their own separate and more flexible way of being configured.

> This intent behind this question is very similar to that asked in 2011:
> "How to externalize a webapp's", but it was never
> adequately answered:
> In general, I'm really grumpy when I have to unpack a WAR and fiddle with
> some files **each time** I deploy it.  If there is some more-general
> mechanism for allowing a deployer (remember those things called 'roles'
> from the EJB 1.0 spec, anyone?) to override configuration settings which
> have unfortunately been embedded in the WAR file, I'd **love** to know
> about it.  I haven't spotted anything about this in the Tomcat doco so far.

In general, I would suggest the VirtualWebappLoader.  With that you can add an external directory
like "/opt/app-1-config/" to the class path for a particular web application.  *If* the application
is loading it's configuration from the class path it will be able to load configuration files
from this location.

I don't think this will work for, but that's a special case.  It would
work for other logging configurations like or logback.xml.  

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message