1 Reply Latest reply on Nov 4, 2013 6:24 PM by James Perkins

    How can we enable debugging of log4j itself

    sigma.wschung Newbie

      My JBoss server.log stops logging during the deployment of an application, right after some TRACE level output statements get printed. I suspect that some code is changing my logging configuration.  I would like to enable debug on the logging library(I understand is log4j) to see what is the cause. I have tried this following ways, but none appears to work:

       

      1. adding -Dlog4j.debug=true to the startup line.

      2. adding this snippet to standalone.xml

       

                <logger category="org.apache.log4j">

                      <level name="DEBUG"/>

                  </logger>

       

      inside the  <subsystem xmlns="urn:jboss:domain:logging:1.2"> section.

       

      3. Adding similar logging configuration in 2. to our own logging.

       

      What is the proper way to enable debugging on the JBoss logging system?

       

      Thanks.

        • 1. Re: How can we enable debugging of log4j itself
          James Perkins Master

          JBoss AS 7 actually uses JBoss Log Manager to configure logging and not log4j. What version of JBoss AS/EAP are you using? If it's EAP you might want to try to add -Dorg.jboss.as.logging.per-deployment=false if you include a log4j configuration file or a logging.properties file in your deployment, but want to use the logging subsystem to configure logging.

           

          To see some debug output you can add a logger with the category org.jboss.as.logging.

           

          --

          James R. Perkins