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

Easier control over JBoss AS6 bootstrap logging

jaikiran pai Master

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?