[logback-user] Logback with Tomcat 7

ceki ceki at qos.ch
Tue Jun 5 09:57:43 CEST 2012


On 04.06.2012 13:51, martin.burchard at pentos.com wrote:
> Hello,
>
> today I've changed the WAR file of my App to only contain the classes of
> my project.
> All other dependencies , also logback, I put into the tomcat/lib folder.
> The logback.xml is still in my WAR, but it looks like it is now ignored.
>
> Then I put the logback.xml also into the lib folder and changed it, that
> it configures only the root logger.
> Seems to work, but my logback.xml in the WAR file is still ignored.
>
> How can a set up a global logging and in addition configure logging on a
> per webapp basis?

Hi Martin,

If you include logback-classic.jar in Tomcat's "global" lib folder,
you cannot configure logging on a per-app basis unless you use
ContextJNDISelector. The topic is discussed in some detail at
[1]. Have you had a chance to look at it?


[1] http://logback.qos.ch/manual/loggingSeparation.html

> Martin
-- 
Ceki
http://twitter.com/#!/ceki


More information about the Logback-user mailing list