Skip to content

Instantly share code, notes, and snippets.

@jamesonwildwood
Last active December 3, 2015 00:35
Show Gist options
  • Save jamesonwildwood/6a43953b737d84fba3ea to your computer and use it in GitHub Desktop.
Save jamesonwildwood/6a43953b737d84fba3ea to your computer and use it in GitHub Desktop.
Full Mule log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Properties>
<Property name="logDir">${sys:mule.home}/logs</Property>
<Property name="appName">myapp</Property>
</Properties>
<Appenders>
<RollingFile name="diagnostic" fileName="${logDir}/mule-app-${appName}.log"
append="true"
filePattern="${logDir}/$${date:yyyy-MM}/mule-app-${appName}-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout pattern="[%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n" />
<TimeBasedTriggeringPolicy />
</RollingFile>
<RollingFile name="monitoring" fileName="${logDir}/mule-app-${appName}-monitoring.log"
append="true"
filePattern="${logDir}/$${date:yyyy-MM}/mule-app-${appName}-monitoring-%d{MM-dd-yyyy}-%i.log.gz">
<PatternLayout pattern="[%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n" />
<TimeBasedTriggeringPolicy />
</RollingFile>
</Appenders>
<Loggers>
<!-- CXF is used heavily by Mule for web services -->
<Logger name="org.apache.cxf" level="WARN"/>
<!-- Apache Commons tend to make a lot of noise which can clutter the log-->
<Logger name="org.apache" level="WARN"/>
<!-- Reduce startup noise -->
<Logger name="org.springframework.beans.factory" level="WARN"/>
<!-- Prevent Default Logger ERROR level messages (which display the payload) -->
<Logger name="org.mule.exception.CatchMessagingExceptionStrategy" level="FATAL"/>
<Logger name="org.mule.exception.DefaultMessagingExceptionStrategy" level="FATAL"/>
<!-- Mule classes -->
<Logger name="httpclient.wire" level="INFO" />
<Logger name="org.apache.commons.httpclient" level="INFO" />
<Logger name="org.mule" level="INFO"/>
<Logger name="com.mulesoft" level="INFO"/>
<!-- Reduce DM verbosity -->
<Logger name="org.jetel" level="WARN"/>
<Logger name="Tracking" level="WARN"/>
<Logger name="org.glassfish.grizzly" level="INFO"/>
<Logger name="org.asynchttpclient" level="INFO"/>
<Logger name="org.mule.util.queue.DualRandomAccessFileQueueStoreDelegate"
level="INFO" />
<Logger name="org.mule.transformer" level="WARN" />
<Logger name="org.jetel.graph" level="WARN" />
<Logger name="org.mule.transport.service.DefaultTransportServiceDescriptor"
level="WARN" />
<Logger name="com.sforce" level="INFO" />
<Logger name="org.mule.module.launcher.DeploymentDirectoryWatcher"
level="WARN" />
<Logger name="org.mule.transformer.graph" level="WARN" />
<Logger name="com.mulesoft.module.batch" level="INFO" />
<Logger name="org.mule.transport.jms.JmsMessageUtils"
level="ERROR" />
<Logger name="org.mule.lifecycle.AbstractLifecycleManager"
level="WARN" />
<Root level="INFO">
<AppenderRef ref="diagnostic"/>
</Root>
</Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment