How to enable Logging from WSO2 API Manager to Nodinite
Enable asynchronous, business-centric logging from WSO2 API Manager to Nodinite. This guide helps you capture API gateway transactions, format log events, and deliver them securely for self-service access and actionable business insights.
Tip
Use Asynchronous Logging to send logs from WSO2 API Manager to Nodinite. Add a custom handler or mediator to your API configurations to enable this integration.
✅ Capture full API request and response payloads for every gateway transaction
✅ Log business transactions asynchronously for reliability and performance
✅ Format logs for Nodinite and deliver them securely via the Pickup Service
✅ Empower business users with self-service log access and insights
Important
Always set OriginalMessageTypeName for searchable business data - When logging from WSO2 API Manager, the Message Types field in your JSON Log Event is critical for enabling business intelligence features. Without proper Message Types:
- Search Field Expressions cannot extract Order Numbers, Customer IDs, Invoice amounts, Transaction codes, or other business identifiers
- Log Views can only search by timestamps and correlation IDs, not by business data
- Non-Events Monitoring cannot track message volumes, detect missing messages, or alert on pattern anomalies
- Business Process Modeling (BPM) cannot correlate API transactions end-to-end across your WSO2 API Manager flows and other systems
Set
OriginalMessageTypeNamein your JSON Log Event before writing to intermediate storage. Plan your Message Types during API development—they define how Nodinite extracts searchable business data from your logged API gateway transactions.
Add a custom handler or mediator to your WSO2 API Manager configuration so you log API gateway transactions to Nodinite.
Diagram: Asynchronous logging flow from WSO2 API Manager to Nodinite, using a custom handler, intermediate storage, and the Nodinite Pickup Log Events Service Logging Agent.
Step by step guide
Follow these steps to enable logging from WSO2 API Manager:
1. Create the event
Add a custom handler or use Log4J in your WSO2 API Manager configuration. Implement a custom handler that intercepts API requests and responses at the API Gateway level, capturing payload and context information.
Tip
WSO2 API Manager supports custom handlers through the
synapse.propertiesoraxis2.xmlconfiguration. You can intercept both request and response flows to capture full payloads from your API gateway transactions.
2. Convert the logged event to Nodinite format
Translate your API gateway logs to the Nodinite JSON Log Event format.
To uniquely identify the Log Agent, set a LogAgentValueId. Make the LogAgentValueId (mandatory number) configurable in your handler configuration. Do not hardcode this value—use different values for each environment (e.g., Prod, Test, QA).
Important
Include OriginalMessageTypeName in your JSON Log Event - This field is mandatory for business intelligence:
{ "LogAgentValueId": 55, "EndPointName": "WSO2 API Manager - Order API", "EndPointUri": "https://wso2-apim:8243/order/v1/create", "EndPointDirection": 0, "EndPointTypeId": 60, "OriginalMessageTypeName": "OrderRequest#1.0", "ProcessingUser": "API-Consumer-App", "ProcessName": "OrderAPI", "ProcessingMachineName": "WSO2-APIM-01", "ProcessingModuleName": "OrderHandler", "ProcessingModuleType": "WSO2APIManager", "StartLogTime": "2025-10-12T10:30:00.000Z", "EndLogTime": "2025-10-12T10:30:01.200Z", "LogMessage": "Order API request received", "StateCode": 0, "ApplicationInterchangeId": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "Body": "<Order><OrderId>ORD-2025-042</OrderId><CustomerId>CUST-99001</CustomerId></Order>" }Without
OriginalMessageTypeName, Search Field Expressions cannot extract business data, and features like Non-Events Monitoring and BPM won't function.
Tip
Map existing API gateway properties to standard Nodinite fields and attach context and payload as needed to maximize the value of your logs. Use Context Options to add custom searchable properties such as API name, consumer application, HTTP method, and response codes.
3. Send event to intermediate storage
Write the Nodinite JSON Log Event to a local, highly available intermediate storage. Configure the Nodinite Pickup Log Events Service Logging Agent to fetch logged events from your chosen storage.
Important
Choose a local, highly available intermediate storage for best reliability. A file folder or database table provides a good balance of simplicity and availability.
Tip
Send logged events asynchronously to the Nodinite Log API. Use the Pickup Service to follow the asynchronous pattern—this decouples your API gateway from Nodinite and prevents logging from impacting API performance.
4. Move logged events using the Nodinite Pickup Service
The Nodinite Pickup Log Events Service Logging Agent fetches Log Events from your intermediate storage. Configure the Pickup Service to consume Log Events from your chosen source.
5. Configure Message Types
Define Message Types for your WSO2 API Manager logged events. Each Message Type represents a specific API operation or message format (e.g., "OrderRequest#1.0", "InvoiceResponse#2.0", "CustomerUpdate#1.0"). Message Types are mandatory and determine which Search Field Expressions will extract business data from your logged API transactions.
6. Configure Search Field Expressions
Create Search Field Expressions bound to your Message Types. These expressions extract business identifiers (Order Numbers, Customer IDs, Invoice amounts, Transaction codes) from your logged API payloads using XPath, JSON Path, Regular Expressions, or other parsers.
7. Create Log Views
Create Role-based Log Views to visualize and search the logged data. Configure role-based access so business users can self-service search by business data extracted by your Search Field Expressions.
8. Configure Non-Events Monitoring (Optional)
Set up Non-Events Monitoring to track expected API call volumes and detect missing transactions from your WSO2 API Manager gateway.
9. Design BPM Processes (Optional)
Use Business Process Modeling (BPM) to correlate API transactions end-to-end across your WSO2 API Manager and other integrated systems.
Next Step
Configure Message Types - Critical first step for searchable business data
Configure Search Field Expressions - Extract business identifiers
Create Log Views - Enable business user self-service
Related Topics
JSON Log Event - Required format for WSO2 API Manager logging
Message Types - Mandatory for business intelligence features
Search Field Expressions - Extract Order Numbers, Customer IDs, Invoice amounts
Log Views - Business-data searches and role-based access
Non-Events Monitoring - Track API call volumes and detect missing transactions
Business Process Modeling (BPM) - End-to-end API transaction correlation
Asynchronous Logging - Recommended approach for reliability
Context Options - Additional searchable properties
Pickup Service - Fetches log events from intermediate storage
Log Agents - Identify logging sources
Roles - Role-based access control