[logback-user] Logback with Tomcat and multiple web applications

Ryan Cornia rcornia at myriad.com
Wed Feb 11 17:57:17 CET 2009

I've been struggling with this in Log4J, and am wondering if it's possible
in Logback.

If I have tomcat, with several web applications, can I have one instance of
the logback jars in Tomcat/lib, and one configuration file, but distinguish
between applications via variable substitution and the pattern?

We are logging to SYSLOG, so I would like the pattern to include the
application name. 

I looked through the manual, and see you can use variable substitution for
specifying different files, but does substitution work in the pattern field?
Can the ContextJNDISelector use a configuration file outside of the war?
Ideally I would have the logging configuration file in tomcat/conf or
somewhere, and have all applications use the same one.

Thanks for any help!

More information about the Logback-user mailing list