Uploaded image for project: 'Mule'
  1. Mule
  2. MULE-5491

Add data to the logging MDC in org.mule.interceptor.LoggingInterceptor

    Details

    • Type: Enhancement Request
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix or Usage Issue
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: Core: (other)
    • Severity:
      S2

      Description

      Logging is really important, and having some more information in the log is nice. I'm suggesting the following be added in the org.mule.interceptor.LoggingInterceptor#begin method

      if(null != event.getMessage().getCorrelationId())

      { MDC.put("mule.correlationId", event.getMessage().getCorrelationId()); }

      MDC.put("mule.messageId", event.getMessage().getUniqueId());
      MDC.put("mule.flow", event.getFlowConstruct().getName());

      and removing them in the last method of the same class.

      All of this could be done directly by in the <logger/> config component, but having added to the MDC and then exposed to the user would be really useful.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              awelynant Craig Skinfill
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: