Reputation: 1535
In my web application i developed my custom logging framework based on slf4j and log4j2.
The application is been deployed on Jobss WildFly 9. The problem is that Wildfly continues to use its
<module xmlns="urn:jboss:module:1.3" name="org.slf4j.impl">
everytime i want to log instead of my framework.
This is the web application tree:
webApplication
|
|_ WEB-INF
|_jboss-deployment-structure.xml
I tried to write the deployment descriptor in this way:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="logging" />
</exclude-subsystems>
<exclusions>
<module name="org.apache.commons.logging" />
<module name="org.apache.log4j" />
<module name="org.jboss.logging" />
<module name="org.jboss.logging.jul-to-slf4j-stub" />
<module name="org.jboss.logmanager" />
<module name="org.jboss.logmanager.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
</jboss-deployment-structure>
and these are the dependencies carried with the framework:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<version>2.6</version>
</dependency>
But this doesn't seem to work.
Upvotes: 3
Views: 4187
Reputation: 1535
I realized there was a dependency inserted inside the web appication manifest pointing to the org.slf4j jboss module
Upvotes: 0