6 Replies Latest reply on Jan 12, 2007 6:35 PM by raviprk

    trace logging for jboss

    btogo

      I am trying to retrieve the JBOSS Connection pool stats by enabling the log4j TRACE level. This is how I do it:

      in the log4j.xml file:

      category
      name="org.jboss...JBossManagedConnectionPoll"
      priority value="TRACE" class="org.jboss.logging.XLevel"
      appender-ref ref="JBOSSLOG"
      category

      the JBOSSLOG appender is referencing an output file where I can see only DEBUG messages.

      Does someone know why the TRACE information is not coming out?

      thanks for your help.

        • 1. Re: trace logging for jboss
          weston.price

          You either have a typo (Pool not Poll) or some other configuration issue in your log4j.xml file.

          It should be

          
           <category name="org.jboss.resource.connectionmanager.JBossManagedConnectionPool">
           <priority value="TRACE" class="org.jboss.logging.XLevel"/>
           </category>
          
          


          • 2. Re: trace logging for jboss
            btogo

            Thanks for your reply. But it is a typo in my posting. I do have Pool in the log4j.xml file.

            Anything else you may think of?

            Thanks,

            • 3. Re: trace logging for jboss
              weston.price

              Can I see the definition of


              JBOSSLOG




              • 4. Re: trace logging for jboss
                btogo

                Sure.

                <appender name="JBOSSLOG" class="org.apache.log4j.DailyRollingFileAppender">
                 <param name="File" value="/home/eta/server/log/connection-jboss.log"/>
                 <param name="Append" value="true"/>
                 <param name="Threshold" value="TRACE"/>
                
                 <!-- Rollover at midnight each day or per size -->
                 <param name="DatePattern" value="'.'yyyy-MM-dd"/>
                 <!-- <param name="MaxFileSize" value="10MB"/> -->
                 <!-- <param name="MaxBackupIndex" value="5"/> -->
                
                 <layout class="org.apache.log4j.PatternLayout">
                 <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
                 </layout>
                 </appender>
                


                • 5. Re: trace logging for jboss
                  humbahe

                  I have a similar problem since there are 2 different log4j.jars distributed with jboss (4.0.5).

                  The log4j-boot.jar in the "lib" folder contains a Logger, that is able to log "TRACE"-Messages.

                  The log4j.jar in the "server/**/lib" folders contains a Logger, that is NOT able to log "TRACE"-Messages.

                  Any attempts to replace the log4j-distributions in the "server/**/lib" folders ended in a log4j configuration error (could not parse url .../log4j.xml).

                  Has anyone an idea howto replace the log4j.jars?

                  • 6. Re: trace logging for jboss
                    raviprk

                    Remove the Threshold attribute from the appender config completely. I had the same problem, seems to be a mismatch between the int values of TRACE in log4j and JBoss.