Updated 9 days ago - 1 minutes to read

How do I correlate logged events?

This guide teaches how to provide vital information that enables correlation for all logged events within one run through a Mule ESB flow.

Mule ESB Flow - Correlation
Do stuff
Do stuff
Do stuff
Log Event
RunId=123
Init Session Variable
RunId=123
Log Event
RunId=123
Log Event
RunId=123

To be able to correlate on several messages within the same Mule Flow, a session variable is required.

SessionVariable_Element

The session variable is named RunID and is placed before the first logging point.

SessionVariable_Flow

<set-session-variable variableName="runID" value="#[java.util.UUID.randomUUID().toString()]" doc:name="Session Variable"/>
XML

Log using Nodinite Logging Custom Connector

Provide the session variable RunID as the local interchange id property when calling the Log sub flow with the Mule ESB - Custom Connector.

Log using Log4J

The Mule Log Agent uses the Log4J framework to log messages. Configuration of Log4J within the Mule ESB flows is further described here.

Next Step

Add or manage Log Agents
Configuration of the agent
Install Mule Log Agent

Log Views
Configuring Log4J
Log Agents