0 Replies Latest reply on Jul 22, 2011 3:41 AM by Peter Butkovic

    jboss as 6 log4j transaction related logging doesn't work

    Peter Butkovic Newbie

      hi all,

       

      we need is to have a possibility to have logging of transaction (begin/commit/rollback) in our application log files.

       

      this is our scenario:

      - ear application

      - log4j is used as a logging framework, layout used and working ok (for our application logs) is:

      deploy\xyz.ear\log4j.xml

      deploy\xyz.ear\lib\log4j-1.2.14.jar

       

      - jboss as version is: jboss-6.0.0.Final

      - we use CMT

      - I'm able to see all the transaction related loggs only in:

      log\server.log

      using configuration in:

      deploy\jboss-logging.xml

      like this:

        <!-- Limit Arjuna transaction manager -->

         <logger category="com.arjuna.ats">

           <level name="TRACE" />

         </logger>

       

      But I can't get it into our log files. Even if I use in our:

      deploy\xyz.ear\log4j.xml

       

      following config:

        <category name="com.arjuna.ats">

          <priority value="TRACE"/>

          <appender-ref ref="XYZ"/>

        </category>

       

      My assumption is that TRACE in log4j is not the TRACE used internally by JBoss logging.

       

      I've checked the code of JBoss and found in:

      com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction code like this:

       

      public void begin() throws javax.transaction.NotSupportedException,

                  javax.transaction.SystemException

          {

              if (jtaLogger.logger.isTraceEnabled()) {

                  jtaLogger.logger.trace("BaseTransaction.begin");

              }

       

      But internally it checks for org.jboss.logging.Level.TRACE

       

      and it has nothing to do with log4j levels.

       

      Any idea how to proceed? Thanks.