Salesforce

How to enable cluster verbose logging in Mule Runtime

« Go Back

Information

 
Content

GOAL

To enable a Mule runtime cluster DEBUG or TRACE logging on Hybrid or On-Prem environments.

 

PROCEDURE

Edit the $MULE_HOME/conf/log4j2.xml file, adding the following content inside the <Loggers> section:
 
<Loggers>
...
     <AsyncLogger name="com.hazelcast" level="DEBUG" additivity="false" >
         <AppenderRef ref="CLUSTERLOG"/>
     </AsyncLogger>
     <AsyncLogger name="com.mulesoft.mule.runtime.module.cluster" level="DEBUG" additivity="false" >
         <AppenderRef ref="CLUSTERLOG"/>
     </AsyncLogger>
...
</Loggers>
After that, edit the same file, adding the following content inside the <Appenders> section:
 
<Appenders>
...
        <RollingFile name="CLUSTERLOG" fileName="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}cluster.log"
                 filePattern="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}cluster-%i.log" 
                 immediateFlush="true" append="true">
            <PatternLayout>
                <Pattern>%d %p %c{10} [%t] %location %m %ex%n</Pattern>
            </PatternLayout>
            <SizeBasedTriggeringPolicy size="10 MB"/>
            <DefaultRolloverStrategy max="50"/>
        </RollingFile>
...
</Appenders>

Finally, restart your mule instance. Once restarted, the cluster log will be directed to the $MULE_HOME/logs/cluster.log file.

NOTE: The DEBUG level should be enough to troubleshoot all the scenarios. Only in case, it is required by Mulesoft Support, the DEBUG level can be changed to TRACE to add even more verbosity.

IMPORTANT: Most of the cluster verbosity is related to cluster node communication, but if you would like to also monitor the health of each node, you may follow the next KB article too: How to enable Hazelcast Health Monitor every specific time 
Attachments

Powered by