I am trying to use log4j2 as the logging framework in an EAR application. I have the log4j2 jar files packaged in the EAR and it is not created as a jboss module. I have log4j2 working fine without any problems when I use it with my log4j2.xml file. However I want to configure it from the admin console so that I will be able to configure it at run time. I have done the following steps, but still its not working.
- Created a file handler.
- Created a new category, set its Log Level to ALL and selected the file handler as its handler.
Is there any other configuration that I need to do to make this working?
I have also added jboss-deployment-structure.xml with the following contents in EAR Project\META-INF\ directory and still no luck.
jboss-deployment-structure.xml file
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="logging" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>