Loading
Slack 관련 문의처가 Salesforce Help로 통합 및 변경됩니다.더 많이 읽기

CloudHub 2.0 vs CloudHub 1.0 - Log Line Size Limits, Multi-Line Log Behavior, and Correlation ID Handling

게시 일자: Sep 3, 2026
상세 설명

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.

  • CloudHub 1.0 applies an approximately 32 KB (32,768-character) write-side limit before the log is shipped. Messages exceeding the configured limit are truncated. The batchRecordMaxLen property in the application's log4j2.xml can be used to configure this limit within the supported range.
  • CloudHub 2.0 applies an 8 KB (8,192-byte) platform-level limit within the Anypoint Monitoring log ingestion pipeline. When a line exceeds this limit, it is split into chunks. The resulting chunks can be re-stamped with the same timestamp and Correlation ID.
  • Neither Mule runtime nor Log4j2 itself imposes a smaller runtime-level limit than the limits described above.
  • The log delivery architecture is also different. CloudHub 1.0 sends log events from the Log4j2 appender to the log aggregator, with the applicable write-side limit applied before shipping. CloudHub 2.0 uses an application output/collector/forwarder path before the logs reach Anypoint Monitoring ingestion, where the 8 KB splitting behavior is applied.
  • The Event ID format may also differ between the platforms. CloudHub 1.0 may display a full UUID, for example:[event: ee14f2e0-9bcc-11f1-8a1b-16ffd441b317]
  • CloudHub 2.0 may display a shorter token, for example:[4bh96]
솔루션

For applications that require reliable correlation of DEBUG-level HTTP wire logs, consider the following approaches.

1. Configure Splunk to merge multi-line events

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.

 2.  Include the Correlation ID directly in the log message

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.

3.  Keep log messages below 8 KB in CloudHub 2.0

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.

4. Send logs directly to Splunk using a Log4j2 HEC appender

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.

 

추가 자원
  • KB 001119055 — Anypoint Monitoring Application Logs Show Truncated Message
  • KB 001117533 — Logs in CloudHub 2.0 and Runtime Fabric are Truncated
  • KB 001119527 — CloudHub 2.0 Logging FAQ
  • Viewing Log Data for Deployed Apps — CloudHub 2.0
  • Integrating with Your Logging System Using Log4j — CloudHub 2.0
Knowledge 기사 번호

005421193

 
로드 중
Salesforce Help | Article