Nav
You are viewing an older version of this section. Click here to navigate to the latest version.

Configuring Logging

For logging, Mule ESB uses slf4j, which is logging facade that discovers and uses a logging strategy from the classpath, such as Log4j or the JDK Logger. By default, Mule includes Log4j, which is configured with a file called log4jj.properties.

The Mule server has a log4j.properties in its conf directory, which you can customize when running the server in Standalone mode. Additionally, all the examples included with Mule have log4j.properties files in their conf directories.

Troubleshooting Logging

I don’t see any logging output

A log4j.properties file must be at the root of your classpath.

I reconfigured Log4j, but nothing happened

This happens because there is another log4j.properties file on your classpath that is getting picked up before you modified one. To find out which configuration file Log4j is using, add the following switch using when starting Mule (or container startup script if you are embedding Mule):


          
       
1
-M-Dlog4j.debug=true

This parameter will write the Log4j startup information, including the location of the configuration file being used, to stdout. You must remove that configuration file before your modified configuration will work.

Controlling Logging from JMX

You can expose a manager’s logging configuration over JMX by configuring a Log4j JMX agent in your Mule configuration file. See JMX Management for more information.