TechBooky AI Assistant
TechBooky AI Assistant
👋 Welcome to TechBooky AI Assistant

I can help with:
🔎 Tech News
🤖 AI Topics
💻 Gadgets
☁️ Cloud
✍️ Guest Posts
📢 Advertising
🔗 Backlinks
📩 Newsletter
  • AI Search
  • Cryptocurrency
  • Earnings
  • Enterprise
  • About TechBooky
  • Submit Article
  • Advertise With TechBooky
  • Contact Us
TechBooky
  • African
  • AI
  • Metaverse
  • Gadgets
  • Intelligence
  • AI Search
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
  • African
  • AI
  • Metaverse
  • Gadgets
  • Intelligence
  • AI Search
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
TechBooky
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Home Software

Accessing And Modifying Mule Message Log In MuleSoft

Contributor by Contributor
July 2, 2021
in Software
Share on FacebookShare on Twitter
Share this story

Send it to someone who should read it.

f Facebook X X in LinkedIn wa WhatsApp tg Telegram @ Email
In Brief
  • In this article, we are going to discuss configuring the message logs in MuleSoft.
  • This session incorporates the prerequisites, working of policy, the policy parameter configuration, and working with mule message logging.
  • The Message Logging policy logs customized messages based on data from incoming requests, backend answers, or data from other policies that have been applied to the...

In this article, we are going to discuss configuring the message logs in MuleSoft. This session incorporates the prerequisites, working of policy, the policy parameter configuration, and working with mule message logging. The Message Logging policy logs customized messages based on data from incoming requests, backend answers, or data from other policies that have been applied to the same API endpoint. You can get this course mulesoft training available online which helps you understand the mule platform. 

 

Prerequisites

To establish or administer APIs, you must hold the Anypoint Platform Organization Administrators role or have the authority to do so.

 

How does policy work?

The steps for logging a policy are as follows:

  1. To the API, a request is issued.
  2. If the following criteria are met, the message gets logged:
    • The logger defined in the log4j2.xml configuration file includes the level and category of the log indicated in the policy.
    • Either the policy’s conditional field was not set, or it was set but the condition was not matched.
  3. The response from the API is returned. The Message Logging Policy does not affect the execution or flow of any policy.
  4. The error message is recorded in the log of an application.

Policy Parameter Configuration

We can now access the program by passing this client id and secret.

Accessing/Modifying Message Logging

The Message Logging policy is used to keep track of custom messages sent between policies and flows. We can keep track of log information about a request or a response. This is useful if we need to gather request/response related logs for troubleshooting purposes without modifying the mule application’s code.

Note: The payload will be consumed by the policy if it is included in the logging message or conditional expression when utilizing non-repeatable streams.

If the streaming strategy for the below HTTP listener is changed to a Non-repeatable stream, the payload will be lost when the flow receives the request since the stream will be devoured by the policy.

We’ll start by building a mule application and connecting it to API Manager – Please see how the Mulesoft application can be connected to API Manager.

Connecting API Manager to Mulesoft application

API Manager’s auto-discovery feature allows you to manage APIs by connecting a deployed application with a platform-created API.

In this scenario, we’ll utilize Anypoint Studio to deploy the app.

Initially, AnyPoint Studio should be updated with your Anypoint Platform credentials; this is the same credential that would employ your code’s deployment to CloudHub.

We’ll need the AnyPoint platform’s credentials — if you don’t see it, ask the administrator.

Copy the Secret and Client id after clicking on the organization’s name.

In the AnyPoint Studio, update and validate the same.

 

Now we must construct the application’s API Manager setup.

Create an API Manager setup for the mule app in an API Manager, and the API name would be synchronized with assets that are exchanged.

After you’ve saved, go to Autodiscovery and look for an API ID. Make a note of it. Also, note that the status is now Unregistered.

As noticed in the previous steps, we should add an AutoDiscovery config to the Mule application – 

 

 

Only use AnyPoint Studio to deploy an application now, as this ensures that the secret and client id is delivered to Cloudhub through AnyPoint Studio.

 

Alternatively, if we would like to deploy a Mulesoft app manually or using Maven, please include the characteristics listed below in the deployment.

Click on the Tab “properties”

anypoint.platform.analytics_base_uri=https://analytics-ingest.anypoint.mulesoft.com/

anypoint.platform.client_id=2ccab1a7dcd94b69b7b1aa93c40af931

anypoint.platform.client_secret=C30fE68A87464438B534eFC47e4da0fB

anypoint.platform.base_uri=https://anypoint.mulesoft.com/

During the logs and the Mule runtime, we can observe the application indicating that API Manager has been registered successfully after it has been deployed.

In addition, we now have access to the endpoint –

Also worth reading
GitHub Hits 7.38 Billion September Commits as Former CEO Launches Rival Apple Adds AI Tools to Creator Studio for Video, Music and Work Apple Blocks Compromised Web Certificates on iPhone and Mac Arc Browser Will Stop Working on 22 December as Dia Takes Over Canva Builds Its Own Image Model With Craft Launch Vibe Coding is Now Available in Google’s AI Studio

If we validate the API manager once again, the status should now be Active, indicating that the application has been registered.

Now, in the API manager, add a client policy for this app.

Choose the origin of a credential.

Click Apply.

We’ll get an authentication issue if we return to the very same endpoint —

Now we’ll construct a credential for the client application to access the application – based on the Exchange access request.

 

If the SLA tier isn’t specified, the page will be redirected to the Client Application page.

Simply take note of the secret and client id.

We can now access the program by passing this secret and client id.

The API manager configuration will be Active after deployment in Cloudhub. 

We shall now put the policy into practice.

Message Logging should be selected.

Now the policy settings should be updated.

The properties are listed below.

  • Message – specify the message we would like to capture in a dataweave expression
  • Conditional – logging depending on conditions – specify in a dataweave expression
  • Category – the capture logs were categorized
  • Level– log level
  • Before calling API – Logs relating to HTTP requests
  • After calling API – Logs about HTTP requests

Let’s fill in the fields with the information we require.

We only like to capture payload if query parameters are specified – GOA is the final destination.

Click apply

Now, suppose we use SOAP UI to test this API,

In Cloudhub, we could see the logs.

Logs will not display in Cloudhub when the query param destination value is changed.

Conclusion

This article has shown you how to configure the message logging. By this, you have successfully learned how to capture the requests or responses that aids while debugging the mule application. 

 

 

References

  1. Message Logging, https://docs.mulesoft.com/api-manager/2.x/message-logging-policy
  2. Message Logging, https://mulesy.com/message-logging/

API Manager – Auto-Discovery, https://mulesy.com/api-manager-auto-discovery/

 

 

Author Bio

I am VarshaDutta Dusa, Working as a Senior Digital Marketing professional & Content writer in HKR Trainings. I Have good experience in handling technical content writing and aspire to learn new things to grow professionally. I am expert in delivering content on the market demanding technologies like  mulesoft tutorial, Dell Boomi Tutorial, Elasticsearch Course, Fortinet Course, postgresql,splunk, Success Factor, Denodo, etc. Follow me on linkedin

Related Reading

More contextual TechBooky stories selected from tags, categories and article context.

  • google-messages-1
    Google to Launch 'Delete for Everyone' Feature on Messages
  • 1756485691039
    Microsoft to Enforce MFA on Azure Resource…
  • Announcing-the-new-admin-center-1c
    Microsoft 365 Admin Center Logins Will Require MFA
  • whatsapp-business
    WhatsApp Business Platform Shifts to Per-Message Pricing
  • 454439424_1017593256482398_3651231210910483627_n
    WhatsApp Adds Multi-Language Voice Message Transcription
  • google-messages-hero
    Google Messages Lets Users Edit RCS Messages to iPhone
  • unnamed (24)
    Truecaller Filters Verified Business Messages
  • WhatsApp-Group-Chats
    WhatsApp Finally Adds Most Requested Group Feature
Keep Reading Smarter

Search TechBooky with AI

Use TechBooky's AI Search to explore the context behind this story and related coverage across the site.

Try AI Search
More On This Topic
Software
Follow TechBooky

Follow TechBooky for more technology stories and newsroom updates.

f Facebook X X in LinkedIn ig Instagram wa WhatsApp

Tags: applicationmulesoftMuleSoft Anypointprogramming
Contributor

Contributor

Posts by contributors. You can send in a post to be reviewed and published to info@techbooky.com

Search TechBooky
Open TechBooky AI Search Try the AI Assistant

BROWSE BY CATEGORIES

Receive top tech news directly in your inbox

subscription from
Loading

Freshly Squeezed

  • Airtel Africa’s Data Boom Shows How Smartphones Are Reshaping Its Business October 30, 2026
  • Amazon Says Prime Video Now Runs at Tens of Billions in Revenue October 30, 2026
  • Binance Reserves $6.34B to Cover Hack Losses, With $5B in Affected Tokens October 30, 2026
  • Binance Hack Raises a Hard Question About DevOps Access October 30, 2026
  • Raenest Adds Crypto Funding, Cards and Yield to Its Cross-Border Wallet October 30, 2026
  • Paratus Namibia Fibre Network Passes 5,000km After New Expansion October 30, 2026
  • Researchers Link Binance $6.3B Hack to North Korea as Exchange Sets Aside $6.34B October 30, 2026
  • OPay Should List in Nigeria and Let Its Customers Share in Its Success October 30, 2026
  • AI Spending Fears Spark Global Tech Sell-off After Big Tech Earnings October 30, 2026
  • DoorDash Agrees to Buy Instacart for $17B as Delivery Giants Combine October 30, 2026
  • OPay Sets $19-$21 Price Range for Planned New York IPO October 30, 2026
  • Binance Says Security Breach Affected $6.3B as Withdrawals Pause October 30, 2026

Browse Archives

October 2026
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  
« Sep    

Quick Links

  • About TechBooky
  • Advertise With TechBooky
  • Contact us
  • Submit Article
  • Privacy Policy
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
  • African
  • Artificial Intelligence
  • Gadgets
  • Metaverse
  • Tips
  • AI Search
  • Intelligence
  • About TechBooky
  • Advertise With TechBooky
  • Submit Article
  • Contact us

© 2025 Designed By TechBooky Elite

Discover more from TechBooky

Subscribe now to keep reading and get access to the full archive.

Continue reading

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.