2 Replies Latest reply on Jul 29, 2015 3:01 AM by V Oplado

    Problem on jboss log and application log

    V Oplado Newbie



      I'm having a problem with application logging.

      All the application logs are recorded in jboss server.log


      I'm migrating our system from jboss4 to jboss 7.1.1.

      After migration the system started normally but all the logs are written to server.log (not in individual module logging).

      The log4j.xml is already tested in old system using jboss 4 and also weblogic.


      Here is what I tried so far:

         1) Added -Dorg.jboss.as.logging.per-deployment=false to $JAVA_OPT in standalone.conf (also tried setting to true)

         2) Added org.jboss.as.logging.per-deployment=false to jboss-app.xml (also tried setting to true)

         3) Exclude org.apache.log4j in jboss-deployment-structure.xml

             Both in deployment and subdeployment

         4) Created my own dependency in $JBOSS_HOME/modules

         5) Added log4j.jar in ear file (APP-INF/lib)

          6) Added log4j.xml in root of ear file



         The log4j.xml seems to be loaded since it will generate error if I try to input an invalid xml entry.



      Ear file structure


          -  APP-INF

                 - lib

          - META-INF

                 - jboss-app.xml

                 - jboss-deployment-structure.xml

                 - MANIFEST.MF

          - MyWarFile.war

                 - META-INF

                      - MANIFEST.MF

                 - WEB-INF

                      - web.xml

                 - COMMON.DTD

                 - REQ.DTS

          - application.xml


      Deployed Environment

          - SampleSystem

                - sg

                     - log4j.xml  ( if I put invalid entry in this file, start-up will fail, so this is definitely loaded)

                     - module1_bean.xml

                     - module2_bean.xml

                - Module1

                      - java

                           - MyEarFile,ear

                       - sg



         all jboss logs will be recorded to server.log

         application logs will be recorded in module1.log and module2.log (specified in my log4j.xml)