Wednesday, 3 September 2014

So you want to....
Change the logging level in Mule ESB in your Mule Studio for a specific project

Background: 
Mule uses Log4j (go read about it)

Get It Done:
1) Create a text file named log4j.properties on your desktop
2) Copy and Paste the grey section below into your log4.properties file
3) Open your Mule Studio and navigate to the your specific mule project
4) Drag and drop the newly created log4j.properties file into the src/main/resource folder
5) Run your project and watch your altered console
6) Edit the log4j.properties file to your wishes
7) Happy logging!

For more information:
Get in touch with the A-Team @ www.8bitplatoon.com



# Default log level
log4j.rootCategory=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n
################################################
# You can set custom log levels per-package here
################################################
# Apache Commons tend to make a lot of noise which can clutter the log.
log4j.logger.org.apache=WARN
# Shuts up some innocuous messages if using the JBPM transport
log4j.logger.org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog=ERROR
#DM logs too much by default 
log4j.logger.org.jetel=WARN
log4j.logger.Tracking=WARN
# Reduce startup noise
log4j.logger.org.springframework.beans.factory=WARN
# Mule classes
log4j.logger.org.mule=INFO
log4j.logger.com.mulesoft=INFO
# Your custom classes
log4j.logger.com.mycompany=DEBUG
# Schema Validation
log4j.logger.org.mule.module.xml.filters.SchemaValidationFilter=DEBUG

No comments:

Post a Comment