---
title: Enable Logging from WSO2 API Manager with Nodinite
description: Enable asynchronous logging from WSO2 API Manager to Nodinite. Capture API gateway transactions, format log events, and deliver business-centric logs for self-service access and actionable insights.
---

# How to enable Logging from WSO2 API Manager to Nodinite

Enable asynchronous, business-centric logging from WSO2 API Manager to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>. This guide helps you capture API gateway transactions, format log events, and deliver them securely for self-service access and actionable business insights.

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>Use <a href="https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/">Asynchronous Logging</a> to send logs from WSO2 API Manager to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>. Add a custom handler or mediator to your API configurations to enable this integration.</p></div>
</aside>

✅ Capture full API request and response payloads for every gateway transaction  
✅ Log business transactions asynchronously for reliability and performance  
✅ Format logs for <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> and deliver them securely via the [Pickup Service][]  
✅ Empower business users with self-service log access and insights  

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><strong>Always set OriginalMessageTypeName for searchable business data</strong> - When logging from WSO2 API Manager, the <a href="https://docs.nodinite.com/repository-model/message-types/overview/">Message Types</a> field in your <a href="https://docs.nodinite.com/core-services/log-event/features/json-log-event/">JSON Log Event</a> is <strong>critical</strong> for enabling business intelligence features. Without proper Message Types:</p><ol>
<li><a href="https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/">Search Field Expressions</a> cannot extract Order Numbers, Customer IDs, Invoice amounts, Transaction codes, or other business identifiers</li>
<li><a href="https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/">Log Views</a> can only search by timestamps and correlation IDs, not by business data</li>
<li><a href="https://docs.nodinite.com/logging-and-monitoring/non-events/overview/">Non-Events Monitoring</a> cannot track message volumes, detect missing messages, or alert on pattern anomalies</li>
<li><a href="https://docs.nodinite.com/repository-model/bpms/overview/">Business Process Modeling (BPM)</a> cannot correlate API transactions end-to-end across your WSO2 API Manager flows and other systems</li>
</ol><p><strong>Set <code>OriginalMessageTypeName</code> in your JSON Log Event before writing to intermediate storage.</strong> Plan your Message Types during API development—they define how <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> extracts searchable business data from your logged API gateway transactions.</p></div>
</aside>

Add a custom handler or mediator to your WSO2 API Manager configuration so you log API gateway transactions to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>.

<div class="mermaid">
graph LR
    subgraph "WSO2 API Manager"
        gw["API Gateway"]-->handler["Custom Handler / Log4J"]
        handler-->storage["Intermediate Storage"]
    end
    subgraph "Nodinite"
        ps["Pickup Service"]-->api["Log API"]
        storage-->ps
    end
</div>

*Diagram: Asynchronous logging flow from WSO2 API Manager to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, using a custom handler, intermediate storage, and the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Pickup Log Events Service Logging Agent][Pickup Service].*

## 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.

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>WSO2 API Manager supports custom handlers through the <code>synapse.properties</code> or <code>axis2.xml</code> configuration. You can intercept both request and response flows to capture full payloads from your API gateway transactions.</p></div>
</aside>

### 2. Convert the logged event to Nodinite format

Translate your API gateway logs to the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JSON Log Event][] format.

To uniquely identify the [Log Agent][Log Agents], 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).

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><strong>Include OriginalMessageTypeName in your JSON Log Event</strong> - This field is <strong>mandatory</strong> for business intelligence:</p><pre><code class="language-json">{
 "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": "&lt;Order&gt;&lt;OrderId&gt;ORD-2025-042&lt;/OrderId&gt;&lt;CustomerId&gt;CUST-99001&lt;/CustomerId&gt;&lt;/Order&gt;"
}
</code></pre><p>Without <code>OriginalMessageTypeName</code>, <a href="https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/">Search Field Expressions</a> cannot extract business data, and features like <a href="https://docs.nodinite.com/logging-and-monitoring/non-events/overview/">Non-Events Monitoring</a> and <a href="https://docs.nodinite.com/repository-model/bpms/overview/">BPM</a> won't function.</p></div>
</aside>

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>Map existing API gateway properties to standard <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> fields and attach context and payload as needed to maximize the value of your logs. Use <a href="https://docs.nodinite.com/core-services/log-event/features/context-options/">Context Options</a> to add custom searchable properties such as API name, consumer application, HTTP method, and response codes.</p></div>
</aside>

### 3. Send event to intermediate storage

Write the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [JSON Log Event][] to a local, highly available intermediate storage. Configure the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Pickup Log Events Service Logging Agent][Pickup Service] to fetch logged events from your chosen storage.

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>Choose a local, highly available intermediate storage for best reliability. A file folder or database table provides a good balance of simplicity and availability.</p></div>
</aside>

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>Send logged events asynchronously to the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> <a href="https://docs.nodinite.com/core-services/log-event/overview/">Log API</a>. Use the Pickup Service to follow the asynchronous pattern—this decouples your API gateway from <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> and prevents logging from impacting API performance.</p></div>
</aside>

### 4. Move logged events using the Nodinite Pickup Service

The <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> [Pickup Log Events Service Logging Agent][Pickup Service] fetches [Log Events][Log Event] from your intermediate storage. Configure the Pickup Service to consume [Log Events][Log Event] 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][Roles]-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)][BPM] to correlate API transactions end-to-end across your WSO2 API Manager and other integrated systems.

## <i class="fal fa-shield-check" aria-hidden="true"></i> What firewall settings are required?

WSO2 API Manager never connects to <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> directly, so you open these hops only:

* **WSO2 API Manager → intermediate storage**: the storage's own port, for example SMB 445 for a file share, 1433 for SQL Server, 5671-5672 and 443 for Azure Event Hubs or Service Bus, or 443 for Azure Blob Storage. A local folder or database needs no rule.
* **[Pickup Service][] → intermediate storage**: the same port, outbound from the server that runs the Pickup Service.
* **Pickup Service → [Log API][]**: the Log API site port, set per environment in the <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Portal. No rule is needed when both run on the Core Services Server.

The [Pickup Service firewall settings][Pickup firewall] list every port and hostname per storage type.

___

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

<i class="fal fa-file" aria-hidden="true"></i> [Configure Message Types][Message Types] - **Critical first step** for searchable business data  
<i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Configure Search Field Expressions][Search Field Expressions] - Extract business identifiers  
<i class="fal fa-table-list" aria-hidden="true"></i> [Create Log Views][Log Views] - Enable business user self-service  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

<i class="fal fa-file-code" aria-hidden="true"></i> [JSON Log Event][] - Required format for WSO2 API Manager logging  
<i class="fal fa-file" aria-hidden="true"></i> [Message Types][] - **Mandatory** for business intelligence features  
<i class="fal fa-magnifying-glass-plus" aria-hidden="true"></i> [Search Field Expressions][] - Extract Order Numbers, Customer IDs, Invoice amounts  
<i class="fal fa-table-list" aria-hidden="true"></i> [Log Views][] - Business-data searches and role-based access  
<i class="fal fa-stopwatch" aria-hidden="true"></i> [Non-Events Monitoring][] - Track API call volumes and detect missing transactions  
<i class="fal fa-project-diagram" aria-hidden="true"></i> [Business Process Modeling (BPM)][BPM] - End-to-end API transaction correlation  
<i class="fal fa-bolt" aria-hidden="true"></i> [Asynchronous Logging][] - Recommended approach for reliability  
<i class="fal fa-gear" aria-hidden="true"></i> [Context Options][] - Additional searchable properties  
<i class="fal fa-truck-pickup" aria-hidden="true"></i> [Pickup Service][] - Fetches log events from intermediate storage  
<i class="fal fa-box-archive" aria-hidden="true"></i> [Log Agents][] - Identify logging sources  
<i class="fal fa-user-shield" aria-hidden="true"></i> [Roles][] - Role-based access control  

[Asynchronous Logging]:https://docs.nodinite.com/core-services/log-api/features/asynchronous-logging/
[BPM]:https://docs.nodinite.com/repository-model/bpms/overview/
[Context Options]:https://docs.nodinite.com/core-services/log-event/features/context-options/
[JSON Log Event]:https://docs.nodinite.com/core-services/log-event/features/json-log-event/
[JSON Path]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/json-path/
[Log Agents]:https://docs.nodinite.com/administration/log-management/log-agents/features/what-is-a-log-agent/
[Log API]:https://docs.nodinite.com/core-services/log-api/overview/
[Log Event]:https://docs.nodinite.com/core-services/log-event/overview/
[Log Views]:https://docs.nodinite.com/administration/log-management/log-views/features/what-is-a-log-view/
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[Non-Events Monitoring]:https://docs.nodinite.com/logging-and-monitoring/non-events/overview/
[Pickup firewall]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/getting-started/prerequisites/#fa-shield-check-firewall-requirements
[Pickup Service]:https://docs.nodinite.com/logging-and-monitoring/pickup-logevents-service/overview/
[Roles]:https://docs.nodinite.com/administration/access-management/roles/features/what-is-a-role/
[Search Field Expressions]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/overview/
[XPath]:https://docs.nodinite.com/administration/log-management/search-fields/features/search-field-expressions/formula/extract/xpath/