Log4j2 logging across deployment options
Design Log4j 2 logging for Mule applications on customer-hosted runtimes, CloudHub 1.0, CloudHub 2.0 and Runtime Fabric: asynchronous versus synchronous logging, what each platform keeps and how long, how to switch on custom appenders, and how to raise log levels for packages such as batch.
Design the logging configurations and options of Mule applications in all deployment options.
~7 min read · 10 practice questions
What the exam expects
- Choose asynchronous or synchronous logging, and handle asynchronous logging failures on customer-hosted runtimes.
- Send CloudHub 1.0 application logs to an external system while keeping them visible to MuleSoft, and size retention against CloudHub's limits.
- Predict which CloudHub 2.0 and Runtime Fabric appenders work, which are removed, and where logs stay visible with a custom configuration.
- Raise log levels for a package per environment, including batch record-level failures and Maven-driven CloudHub 2.0 deployments.
Application log: the per-app log defined by the app's log4j2.xml. Runtime log: mule_ee.log, which records app and lifecycle events. Appender: the Log4j 2 element that decides where log events go. Asynchronous logging: logging on a separate thread so message processing does not wait (Configuring Logging).
Sources for this section (1)
Key facts
- Detail
- Asynchronous, INFO and above.
- Detail
AsyncLoggerConfig.ExceptionHandlernames an LMAXExceptionHandlerclass.
- Detail
- 100 MB per app per worker or 30 days, whichever first.
- Detail
- Disable CloudHub logs; keep
Log4J2CloudhubLogAppender.
- Detail
- Only system logs in Runtime Manager; no worker log download.
- Detail
- Console logging is disabled by default.
- Detail
- Third-party appenders only.
- Detail
- Apply Changes restarts the app.
- Detail
- Disabled by default;
CUSTOM_LOG4J_ENABLED.
- Detail
- Asynchronous appenders only.
- Detail
com.mulesoft.mule.runtime.module.batchat DEBUG.
Sources for this section (7)
- Configuring Loggingdocs.mulesoft.com (opens in a new tab)
- View Log Datadocs.mulesoft.com (opens in a new tab)
- CloudHub Log4j integrationdocs.mulesoft.com (opens in a new tab)
- CloudHub 2.0 Log4j integrationdocs.mulesoft.com (opens in a new tab)
- Managing App Logsdocs.mulesoft.com (opens in a new tab)
- Exporting Telemetry Externallydocs.mulesoft.com (opens in a new tab)
- Batch errorsdocs.mulesoft.com (opens in a new tab)
- Why does a CloudHub 1.0 log entry show a different hour in the console from the stored record?
- When you filter CloudHub 1.0 logs by time through the CloudHub API, what format do
startTimeandendTimerequire? - When the same error hits records in two different batch steps at the default level, how many detailed entries appear?
- How long does CloudHub 1.0 keep the history of inactive deployments?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the MuleSoft Platform Integration Architect pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 40 lessons of the MuleSoft Platform Integration Architect guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Practice exams purchase adds inline bank questions and topic practice (10 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Choose guide-only, practice-only, or save $4 with both