Description of problem: Two ear files are deployed on EAP instance and both are configured to use different logging profile through EAR/META-INF/MANIFEST.MF file. WAR file from EAR uses some libraries those are present in the "lib" folder of each ear file. Application1.ear which logs in app1.log and Application2.ear which logs in app2.log. when we access application we can see logging from EAR1 into EAR2 log file . Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Start server instance with attached standalone.xml file(Logging subsystem contains logger-profile configuration) 2. Deploy both EAR files and access them 3. Check log files. Actual results: Expected results: Additional info:
Created attachment 1333598 [details] EAR files
Created attachment 1333599 [details] EAR files to replicate issue.
Since the library doing the logging is a shared in the EAR it looks like when first invoked it's seeing the log context from the first WAR in the EAR that uses it. This should see whichever log context belongs to the EAR not either of the WAR's. What this means is that any libraries in the EAR's lib directory should be using the EAR's log context. In the case of the attached example the shared library should be using the system log context since the EAR does not have a logging profile associated with it.
Doing some testing for another issue I wanted to see if a fix for this would fix the other issue. Since I made the change already I submitted a PR for it as well. https://github.com/jbossas/jboss-eap/pull/3053
I forgot to mention too. I wasn't sure if it was correct to assign the issue to myself or not. If not please let me know and I will reset it.
The fix has been made in https://github.com/jbossas/jboss-eap/pull/3053 Can this be targeted towards the next CP release ?