Logging the startup process

JBoss uses the Log4jService (in JBoss AS 5.x and earlier) or the LoggingService (in JBoss AS 6.x and later) to configure logging.

However this service is not configured until after the bootstrap phase.

During the bootstrap the microkernel logs into log/boot.log using the configuration defined in log4j.properties (in 5.x and earlier) or logging.properties (in 6.x and later) contained in $JBOSS_HOME/bin/run.jar.

If you want to customize the boot loggin you have basically two options:

  • Change the configuration inside run.jar 
  • Use a system property to reference an outside configuration file.

The simplest strategy is to un-jar $JBOSS_HOME/bin/run.jar, change the appropriate properties file and re-jar. (We suggest you using the Open Source archiving software 7-zip which does a good job at editing files inside of archives).

Alternatively, you can also specify the boot log configuration at the command line, instead of editing run.bat/run.sh, for example:

run.bat -Dlog4j.configuration=file:./log4j.properties

or for the release 6.x :

run.bat -Dlogging.configuration=file:./logging.properties

How to start JBoss as a service.

See the following article: Run JBoss as Service HowTo

0
0
0
s2smodern

Related articles available on mastertheboss.com

JBoss MBeans POJO

JMX MBean services are the core building blocks of the JBoss Appl

How to a dump of JNDI tree with JMX console ?

#2 JBoss Howto. This is the recipe of the day

How to configure JBoss to bind to a different IP ?

  If you want to change the jboss.bind.address property use the 

How to shut down JBoss from remote ?

JBoss recipe of the day

How to create multiple instances of an Mbean?

  Supposing you need two instances of an MBean, let's say one fo

JBoss classloader issues

By default JBoss (prior to version 3.2) uses a flat class loading