0
votes

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.

  1. Created a file handler.
  2. 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>
1

1 Answers

0
votes

You cannot use the admin console or any default management operations to configure a log4j2 log manager. WildFly uses JBoss Log Manager. The admin console or any management operation uses the logging subsystem to make configuration changes. This will only work with JBoss Log Manager.