2 Replies Latest reply on May 24, 2010 4:05 AM by jaikiran

    Easier control over JBoss AS6 bootstrap logging

    jaikiran

      In the recent released version of AS 6.0.0 users have been having some problem trying to enable finer level logs for JBoss related packages. Infact, even on trunk when I have to enable TRACE/DEBUG level or control any logging from JBoss related packages, I find it difficult to do so. The real reason is because the JBoss AS bootstrap logging stays too late in the startup process. The bootstrap logging stays until the jboss-logging.xml from JBOSS_HOME/server/< servername>/deploy folder is deployed. Which means that any (most of the) prior logging has to be controlled through editing the bootstrap logging properties in JBOSS_HOME/bin/run.jar. And obviously, that's not practical to unjar, edit and rejar the run.jar. There's an alternate solution for this, as mentioned in the wiki http://community.jboss.org/wiki/JBossBootLogging:

       

      - Extract the logging.properties from run.jar into JBOSS_HOME/bin/logging.properties
      - Edit run.bat (or .sh) and add:

       

      set JAVA_OPTS=%JAVA_OPTS% -Dlogging.configuration=file:%DIRNAME%logging.properties

       


      I was thinking, that we should by default ship the AS in this way. i.e. Instead of bundling logging.properties in run.jar, we could place it in JBOSS_HOME/bin folder and add this system property to the run.sh/.bat scripts. This way, the end users (and us) don't have to do it themselves.

       

      The real solution to all this, is to not let bootstrap logging stay on for too long. It's being addressed in this JIRA https://jira.jboss.org/browse/JBAS-7681. But I don't think, that it's going to happen anytime soon. So, in the meantime, I guess we could make it easier to control the logging as mentioned above.

       

      Thoughts?

        • 1. Re: Easier control over JBoss AS6 bootstrap logging
          dmlloyd

          That's a good idea, Jaikiran.  This property could be set in run.sh or in Main itself if we want to keep the command-line down.  Or we could edit logmanager to also search ${user.dir} by default.

          • 2. Re: Easier control over JBoss AS6 bootstrap logging
            jaikiran

            Thanks David. I created https://jira.jboss.org/browse/JBAS-8044 to track this.

             

            David Lloyd wrote:

             

            This property could be set in run.sh or in Main itself if we want to keep the command-line down.  Or we could edit logmanager to also search ${user.dir} by default.

            I am planning to just change the run script file (since that's the easiest and the most visible way). But if anyone thinks that it's going to clutter the run script, then feel free to bring it up and I'll switch to one of the other alternatives that David mentions.