-
1. Re: Wildfly 8.2.0 application logging with logback
jaysensharma Apr 15, 2015 5:05 AM (in response to t.becker)1 of 1 people found this helpfulHello Thomas,
I tried something like following on WildFly 8.2 and it seems to be working fine in
Test.ear
├── logback_SLFf4j_Demo.war
│ ├── index.jsp
│ └── WEB-INF
│ ├── classes
│ │ ├── logback.xml
│ │ ├── servlets
│ │ │ └── TestServlet.class
│ │ └── TestServlet.java
│ └── lib
│ ├── logback-classic-1.1.2.jar
│ ├── logback-core-1.1.2.jar
│ └── slf4j-api-1.6.4.jar
└── META-INF
├── application.xml
└── jboss-deployment-structure.xml
My "Test.ear/META-INF/jboss-deployment-structure.xml" looks like following where rather than excluding the subsystem logging i did the following:
<jboss-deployment-structure> <ear-subdeployments-isolated>false</ear-subdeployments-isolated> <deployment> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> </deployment> <sub-deployment name="logback_SLFf4j_Demo.war"> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> <local-last value="true" /> </sub-deployment> </jboss-deployment-structure>
So in your case may be you can try it something like following:
<jboss-deployment-structure> <ear-subdeployments-isolated>false</ear-subdeployments-isolated> <deployment> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> </deployment> <sub-deployment name="logiq-web.war"> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> <local-last value="true" /> </sub-deployment> <sub-deployment name="logiq-ejb.jar"> <dependencies> <module name="org.hibernate.search.orm" services="export" /> </dependencies> <exclusions> <module name="org.slf4j" /> <module name="org.slf4j.impl" /> </exclusions> </sub-deployment> </jboss-deployment-structure>
-
2. Re: Wildfly 8.2.0 application logging with logback
t.becker Apr 16, 2015 6:21 AM (in response to jaysensharma)Hey Jay Kumar,
thx for your reply! I've tried something similar yesterday:
<!-- Aktiviert Hibernate Search für die Module im EAR file -->
<jboss-deployment-structure>
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="org.hibernate.search.orm" services="export" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</deployment>
<sub-deployment name="logiq-web.war">
<dependencies>
<module name="org.hibernate.search.orm" services="export" />
</dependencies>
<local-last value="true" />
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</sub-deployment>
<sub-deployment name="logiq-ejb.jar">
<dependencies>
<module name="org.hibernate.search.orm" services="export" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl" />
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
With the effect that the application started and used my logback.xml. However I have now a combination of the logging pattern in jboss and my logback message:
[0m [0m12:15:09,833 INFO [stdout] (default task-64) 12:15:09.833 [default task-64] [username qeoFoKk2Du0H6WiSgxEX8l3i] DEBUG some.package.event.ExecutionMonitor - execution finished: Execution [z_kn4-801175321] - 5756ms, 570 event(s) taking 1584674µs
What's the cause of this now and how can I avoid it?