8 Replies Latest reply on Aug 17, 2015 4:09 AM by sridhar thiyagarajan

    How to prevent application logs getting logged in server.log in Wildfly 8.2.0 Final AS

    sridhar thiyagarajan Novice

      Hello,

       

      I am migrating an EAR application from JBoss 6.1.0 AS to Wildfly 8.2.0 AS. EAR contains log4j.xml and application logs are generated by using this logging configuration file by employing the below line of code:

       

      org.apache.log4j.xml.DOMConfigurator.configureAndWatch(log4j file path)


      Application logs are generated fine but in server.log, application logs are also getting appended. I am using standalone-full-ha.xml configuration file and tried the below steps:

       

      1. Added jboss-deployment-structure.xml with the following contents:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure>

          <deployment>

               <exclude-subsystems>

              <subsystem name="logging" />

           </exclude-subsystems>

          </deployment>   

      </jboss-deployment-structure>

       

      2. Added below lines under <subsystem xmlns="urn:jboss:domain:logging:2.0"> section.

       

      <add-logging-api-dependencies value="false"/>

      <use-deployment-logging-config value="true"/>

       

      How can I prevent applications logs getting appended in server.log ? Please help.