Customers using CloudHub 2.0 with DEBUG-level HTTP wire logging enabled through HttpMessageLogger may observe that Event IDs or Correlation IDs are present on the initial log line but missing from subsequent physical lines when logs are forwarded to external systems such as Splunk.
This behavior is caused by two separate mechanisms.
First, multi-line log events can result in Event IDs or Correlation IDs appearing only on the first physical line. Log4j2 MDC values, including the Event ID or Correlation ID, are associated with the log event and are rendered once. When the message contains embedded newline characters, such as an HTTP wire dump containing request headers, response headers, or formatted JSON payloads, the continuation lines are treated as part of the same log message and do not receive a separate MDC prefix.
This behavior can occur in both CloudHub 1.0 and CloudHub 2.0. Therefore, ID-less continuation lines in HTTP wire logs should not, by themselves, be considered a CloudHub 2.0 Event ID propagation issue.
Second, log line size handling differs between CloudHub 1.0 and CloudHub 2.0.
batchRecordMaxLen property in the application's log4j2.xml can be used to configure this limit within the supported range.[event: ee14f2e0-9bcc-11f1-8a1b-16ffd441b317][4bh96]For applications that require reliable correlation of DEBUG-level HTTP wire logs, consider the following approaches.
For existing HTTP wire logging, configure Splunk to recognize the beginning of a new log event and associate continuation lines with the preceding event. Depending on the Mule log format, this can be implemented using SHOULD_LINEMERGE = true in props.conf, or by using an explicit LINE_BREAKER or BREAK_ONLY_BEFORE rule that matches the timestamp or other known beginning-of-event pattern.This allows HTTP wire-dump continuation lines to be grouped with their originating log event and associated Event ID.
For application-generated logs, include the Correlation ID explicitly in the message body rather than relying only on the Log4j2 MDC prefix.
Example:<logger level="INFO"
message="#['correlationId=' ++ correlationId ++ ' | ' ++ message]" />
Because the identifier is part of the message body, it remains available even when the message is represented across multiple physical lines.
Where possible, reduce, truncate, or pre-split large log payloads so that individual log lines remain below the CloudHub 2.0 Anypoint Monitoring ingestion threshold of 8 KB. For additional information about application log truncation, see KB 001119055.
For use cases requiring greater control over log delivery, configure a Splunk HTTP Event Collector (HEC) appender in the application's log4j2.xml.
This approach sends application logs directly to Splunk and avoids relying on the Anypoint Monitoring log-ingestion path for those logs. For configuration details, refer to the CloudHub 2.0 documentation, Integrating with Your Logging System Using Log4j.
005421193

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.