Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ServiceMix uses Log4j by way of Apache Commons Logging for logging purposes. Via the Log4J configuration, the logging can be almost completely customized to suit your needs. Below are a couple of common changes people need right away. For any additional changes and for more information on Log4J, see the Log4J manual.

Step One: Change the Root Logger Level

Edit the conf/log4j.xml file and change the root level on or around line #66 from this:

Code Block

<root>
  <level value="INFO"/>
  ...
</root>

to this:

Code Block
<root>
  <level value="DEBUG"/>
  ...
</root>

Step Two: Change an Appender

...

Notice that the only element that was changed was the threshold parameter. This change allows the logging output to the console to be at the debug level.

Changing Logging For Projects Included in ServiceMix

There are times when you need to change the logging for a another project that is included in ServiceMix such as ActiveMQ, Camel, Spring, etc.

  1. Follow the two steps in the previous section to change the root level logger and an appender
  2. Change an existing logger or add your own logger for the package from which you want to see the debug logging

For example, let's use ActiveMQ as one example. To output debug level logging from ActiveMQ as it's deployed inside of the ServiceMix container, change the following logger from this:

Code Block

<logger name="org.apache.activemq">
  <level value="WARN"/>
</logger>

To this:

Code Block

<logger name="org.apache.activemq">
  <level value="debug"/>
</logger>

After making this change, ServiceMix will output debug level logging for ActiveMQ.

ServiceMix inside OpenESB / Glassfish

...