5. Agenda
What is JSON Logger?
Publishing JSON Logger to Anypoint Exchange
JSON Logger Attributes
Common Error Handling.
Publishing Error Handling Framework to Anypoint Exchange
Add Error Handling dependencies in MuleSoft application
6. What is JSON Logger?
● JSON Logger is basically used for logging the message, content in the JSON format. As
logging is very important part of your application but most of the time it is ignored and not
consider as an second citizen and it is taken as an granted.
● Logging is very essential part of your application and it is very important during any
production issue or for troubleshooting.
● MuleSoft provides out-of-box Logger components and it is very easy to use but JSON
logger provides structured way of logging the data.
● JSON Logger can be integrate with third parties tools like Splunk, ELK etc.
7. Features Of JSON Logger
JSON Logger provides various capabilities
● Logging the message, content.
● Masking the sensitive data in payload before logging.
● DataWeave Functions.
● Sending logs to External Destination like JMS, AMQP etc.
7
8. Publishing JSON Logger to Anypoint Exchange
Make sure Git is installed on your Desktop.
Step 1: - Clone the Git Repositories JSON Logger to local
git clone https://github.com/mulesoft-consulting/json-logger.git
Step 2: - Add Entry in setting.xml in .m2 repository
Step 3: - Publishing JSON Logger to Anypoint Exchange
./deploy-to-exchange.sh <Anypoint_Org_Id>
8
<servers>
<server>
<id>Exchange2</id>
<username>Anypoint_Username</username>
<password>Anypoint_Password</password>
</server>
</servers>
10. • Live Demonstration
- Publishing JSON Logger To Anypoint Exchange
- Implementing JSON Logger in MuleSoft Application
- Masking Data in Payload
- Disabled Fields
- Sending Logs to External Systems (Apache Active MQ)
18. Live Demonstration
- Creating Common Error Handling Framework
- Publishing Common Error Handling Framework to Anypoint
Exchange
- Import Common Error Handling in MuleSoft Application
- Publishing Common Error Handling Framework to Nexus