Hi,
I'm facing problems in getting my enterprise application read the logback.xml and configure my logger.
I read serveral discussions about this issue already, but nothing seems to work for me. For several reasons I need to use logback and cannot switch to a different logging framework.
I tried to exclude org.slf4j in my deployment and all sub-deployments in jboss-deployment-structure.xml, but this had no effect. Everything is still logged to server.log and only to server.log.
Here is my jboss-deployment-structure.xml from the ear-File:
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.sl4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
<sub-deployment name="ejb.jar">
<exclusions>
<module name="org.sl4j" />
<module name="org.slf4j.impl" />
</exclusions>
</sub-deployment>
<sub-deployment name="web.war">
<exclusions>
<module name="org.sl4j" />
<module name="org.slf4j.impl" />
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
The structure of my project is as follows:
ear.ear
|
|--- lib
. |
. |--- slf4j-api.jar
. |--- logback-classic.jar
. |--- logback-core.jar
|--- ejb.jar
. |--- logback.xml
|--- META-INF
. |--- jbopss-deployment-structure.xml
|--- web.war
In logback.xml a different log folder is defined. Nothing is logged to this folder.