---
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 :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:
>
>1. [Search Field Expressions][] cannot extract Order Numbers, Customer IDs, Invoice amounts, Transaction codes, or other business identifiers
>2. [Log Views][] can only search by timestamps and correlation IDs, not by business data
>3. [Non-Events Monitoring][] cannot track message volumes, detect missing messages, or alert on pattern anomalies
>4. [Business Process Modeling (BPM)][BPM] cannot correlate API transactions end-to-end across your WSO2 API Manager flows and other systems
>
>**Set `OriginalMessageTypeName` in 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:.

<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 :Nodinite:, using a custom handler, intermediate storage, and the :Nodinite: [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.

>[!TIP]
>WSO2 API Manager supports custom handlers through the `synapse.properties` or `axis2.xml` configuration. 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][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).

>[!IMPORTANT]
>**Include OriginalMessageTypeName in your JSON Log Event** - This field is **mandatory** for business intelligence:
>
>```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": "<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][Pickup Service] 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][Log Event]. 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][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.

## :fa-shield-check: What firewall settings are required?

WSO2 API Manager never connects to :Nodinite: 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 :Nodinite: 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.

___

## :fa-hand-point-right: Next Steps

:fa-file: [Configure Message Types][Message Types] - **Critical first step** for searchable business data  
:fa-magnifying-glass-plus: [Configure Search Field Expressions][Search Field Expressions] - Extract business identifiers  
:fa-table-list: [Create Log Views][Log Views] - Enable business user self-service  

## :fa-link-horizontal: Related Topics

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

[Asynchronous Logging]:{ndr}/Core%20Services/Log%20API/Features/Asynchronous%20Logging.md
[BPM]:{ndr}/Repository%20Model/BPMs/Overview.md
[Context Options]:{ndr}/Core%20Services/Log%20Event/Features/Context%20Options.md
[JSON Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[JSON Path]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/JSON%20Path.md
[Log Agents]:{ndr}/Administration/1.%20Log%20Management/3.%20Log%20Agents/Features/What%20is%20a%20Log%20Agent.md
[Log API]:{ndr}/Core%20Services/Log%20API/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[Log Views]:{ndr}/Administration/1.%20Log%20Management/1.%20Log%20Views/Features/What%20is%20a%20Log%20View.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[Non-Events Monitoring]:{ndr}/Logging%20and%20Monitoring/Non-Events/Overview.md
[Pickup firewall]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Getting%20started/1.%20Prerequisites.md#fa-shield-check-firewall-requirements
[Pickup Service]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[Roles]:{ndr}/Administration/3.%20Access%20Management/1.%20Roles/Features/What%20is%20a%20Role.md
[Search Field Expressions]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Overview.md
[XPath]:{ndr}/Administration/1.%20Log%20Management/2.%20Search%20Fields/Features/Search%20Field%20Expressions/Formula/Extract/xPath.md