0

I currently have a log4j2.xml file that is module specific stored at /opt/EAP-6.4.0/standalone/configuration/log4j2.xml. I want to include that file in the classpath of the war module when the service is being deployed. I tried hard-coding the classpath in the MANIFEST.mf file but that isnt working. The idea is to separate out the configuration files while still including it into the classpath of the deployed wars. Thank you.

TonyNguyen
  • 183
  • 1
  • 1
  • 5
  • JBoss brings its own Log4J implementation as a module. Modules are always loaded first, so you are probably using the log4j implementation of JBoss that does not see the log4j.xml in your application.If you have an own impl in your application you could try to exclude the dependency on log4j by adding this jboss-deployment-structure.xml to the WEB-INF folder of your war file. – Anup Dey Nov 08 '17 at 04:42
  • Anup, thank you for your response. Yes, I added the exclusion . However, I want to use my custom log4j.xml but I want to store it outside of the war. Is this possible? – TonyNguyen Nov 08 '17 at 17:16
  • So you want the `log4j2.xml` file to live in the configuration directory on the filesystem and you have the log4j2 library in your deployment? – James R. Perkins Nov 08 '17 at 18:58

0 Answers0