Message Logging Policy in MuleSoft

Published on
June 30, 2021
Author
MuleSoft Integration Team
Message Logging Policy in MuleSoft

The Message Logging policy logs custom messages from incoming requests, responses from the backend, or information from other policies applied to the same API endpoint.

Steps to implement the Message Logging Policy:

  1. Select the Message Logging Policy from the Apply New Policy in the API Manager.

message logging Mule

  1. Now specify the type of content you want to log. Fill the Parameters accordingly :
Message A DataWeave expression to use for extracting the message to be logged.
Conditional A DataWeave Boolean expression used to specify whether a message is to be logged
Category A prefix in the log message that indicates the package and class where the log is executed. If no category is set, the default value is org.mule.runtime.logging.policy-<policy id>.
Level Defines the level of message to log: INFO, WARN, ERROR, or DEBUG
Before Calling API Set to cause your logging policy to log messages before the API endpoint is called, taking into account the order in which this policy is applied
After Calling API Set to cause your logging policy to log messages after the API endpoint is called, taking into account the order in which this policy is applied

Suppose we want to log the payload; accordingly, we need to set the parameters as shown in the image below:

MuleSoft Message logging Policy

  1. Give the request to the API.

Mule Message Logging Policy

  1.  Now open the Logs of the API.

Anypoint Platform -> Runtime Manager -> API -> Logs,

We can see the payload in the logs, which is similar to what we got while requesting the API.

Thanks for reading. Learn more from certified MuleSoft Experts here at Caelius Consulting Resource Centre

Recent Blogs

CPQ to Agentforce Revenue Management: Why Your Next Migration Should Start with Business Strategy, Not Configuration
BlogAug 6, 2026

CPQ to Agentforce Revenue Management: Why Your Next Migration Should Start with Business Strategy, Not Configuration

Every technology platform eventually evolves. The organizations that realize the greatest value are not the ones that migrate first they are the ones that use the transition to rethink how their business operates. That is exactly where many organizations find themselves today as they plan their move from Salesforce CPQ to Agentforce Revenue Management. The… Continue reading CPQ to Agentforce Revenue Management: Why Your Next Migration Should Start with Business Strategy, Not Configuration

Read More
Blog
5 min read

CPQ to Agentforce Revenue Management: Why Your Next Migration Should Start with Business Strategy, Not Configuration

Every technology platform eventually evolves. The organizations that realize the greatest value are not the ones that migrate first they are the ones that use the transition to rethink how their business operates. That is exactly where many organizations find themselves today as they plan their move from Salesforce CPQ to Agentforce Revenue Management. The… Continue reading CPQ to Agentforce Revenue Management: Why Your Next Migration Should Start with Business Strategy, Not Configuration

Read More
Integrating Salesforce with MuleSoft: A Practical Guide
BlogApr 3, 2026

Integrating Salesforce with MuleSoft: A Practical Guide

Salesforce and MuleSoft integrations are often presented as straightforward connector setups but the real complexity lies in authentication design and access control. This guide walks through a clean, production-ready approach to setting up a secure integration between Salesforce and MuleSoft. Why This Matters More Than Ever With recent updates in Salesforce, basic authentication is being… Continue reading Integrating Salesforce with MuleSoft: A Practical Guide

Read More
Blog
5 min read

Integrating Salesforce with MuleSoft: A Practical Guide

Salesforce and MuleSoft integrations are often presented as straightforward connector setups but the real complexity lies in authentication design and access control. This guide walks through a clean, production-ready approach to setting up a secure integration between Salesforce and MuleSoft. Why This Matters More Than Ever With recent updates in Salesforce, basic authentication is being… Continue reading Integrating Salesforce with MuleSoft: A Practical Guide

Read More
Designing for Reality: Integrating 837 Claims When X12 Meets Production
BlogFeb 11, 2026

Designing for Reality: Integrating 837 Claims When X12 Meets Production

Designing 837 Claim Integration for Real-World Healthcare Systems When it comes to 837 claim integration, most architects assume the X12 specification guarantees predictability. On paper, the 837 Professional, Institutional, and Dental transactions look clean and orderly. In production? Not even close. Real-world 837 files behave differently across trading partners. Loops appear conditionally. Repeatable segments shift… Continue reading Designing for Reality: Integrating 837 Claims When X12 Meets Production

Read More
Blog
5 min read

Designing for Reality: Integrating 837 Claims When X12 Meets Production

Designing 837 Claim Integration for Real-World Healthcare Systems When it comes to 837 claim integration, most architects assume the X12 specification guarantees predictability. On paper, the 837 Professional, Institutional, and Dental transactions look clean and orderly. In production? Not even close. Real-world 837 files behave differently across trading partners. Loops appear conditionally. Repeatable segments shift… Continue reading Designing for Reality: Integrating 837 Claims When X12 Meets Production

Read More
AI-Driven PDF Parsing in Salesforce
BlogDec 4, 2025

AI-Driven PDF Parsing in Salesforce

Introduction For the current digital ecosystem, data is an important aspect for decision-making. Yet, for many organizations, a significant portion of this valuable data remains locked away in unstructured formats. Organizations handle thousands of PDF documents daily — ranging from contracts and invoices to lab reports, quotations, and service agreements. Traditionally, extracting structured data from… Continue reading AI-Driven PDF Parsing in Salesforce

Read More
Blog
6 min read

AI-Driven PDF Parsing in Salesforce

Introduction For the current digital ecosystem, data is an important aspect for decision-making. Yet, for many organizations, a significant portion of this valuable data remains locked away in unstructured formats. Organizations handle thousands of PDF documents daily — ranging from contracts and invoices to lab reports, quotations, and service agreements. Traditionally, extracting structured data from… Continue reading AI-Driven PDF Parsing in Salesforce

Read More