[logback-user] Bug in include tag

Ceki Gülcü ceki at qos.ch
Tue Jun 14 14:37:06 CEST 2011

Hello Amit,

One possible workaround is to use a fixed file path for the common 
configuration file. Example:

<include resource="/opt/logback/common-configuration.xml" />


On 14/06/2011 8:11 AM, Amit A Gadkari wrote:
> We are having ear project with multiple web modules and ejb module.
> Logback is in shared library (websphere shared library which is loaded by
> different class loader)
> We have logback configuration files for each module.
> We have but all common appenders, logger in common included file which is in
> Java shared project which is used by all web modules and ejb modules in ear
> project.
> This included file we are including in logback configuration file for each
> module.
> Now logback is not able to find this included file.
> Reason:
> Logback.xml file of each module is loaded by classloader of web module
> While loading include file instead of using classloader of web module, it
> uses classloader of shared library.
> (Logback internally uses class loader of Loader.class)
> <include resource="common-configuration.xml" />
> I think that this is bug as classloader which loaded logback.xml file of
> each module, should be used for loading included file also.
> Is there any workaround for this issue?

More information about the Logback-user mailing list