How to reference log4j2.xml that is in a war file, from the standalone.xml in Wildfly

136 views Asked by At

I'm trying to reference a log4j2.xml that will be in a deployed war file in Wildfly. I'm trying to reference it from my standalone.xml file. Currently, my log4j2.xml is in my standalone/configuration folder but we need to reference it from the war file.

Here is my current code

<system-properties> <property name="log4j.configurationFile" value="${jboss.server.base.dir}/configuration/log4j2.xml"/> </system-properties>

Other suggestions I found relating to this, suggest to add some code but I need to do this via Wildfly because we have a lot of subsystems that have their own Wildfly server running and want to make it that we only change in one place if we have to change something.

0

There are 0 answers