---
title: Enable Logic Apps Logging in Azure for the Nodinite Logic Apps Agent
description: "Set up Azure for logging Logic Apps to Nodinite: a Diagnostic setting with WorkflowRuntime on each Logic App, a dedicated Event Hub in the same region, and one checkpoint Storage Container per Event Hub."
---

# :fa-hard-drive: Enable Logic Apps Logging in Azure

Monitoring needs only the Azure REST API, but [Logging Logic Apps][] and failed-run monitoring need Azure to stream each run's events to the :Nodinite: [Azure Logic Apps Logging and Monitoring Agent][Azure Logic Apps Agent]. That stream is three pieces you set up in Azure: a **Diagnostic setting** on every Logic App, an **Event Hub** that carries the events, and a **Storage Container** where the agent keeps its read position. Get them right once, and every new Logic App only needs its Diagnostic setting. This page is part of the [Prerequisites][]; the roles the agent needs on these resources are in [Azure Access and Roles][Prerequisites - Azure access].

## :fa-list-check: What to set up

To log to :Nodinite: from your Logic Apps, set up the following in the [Azure portal](https://portal.azure.com)<sup>:fa-arrow-up-right-from-square:</sup>, or script it with the [ARM Template][] in your build and deployment process.

* :fa-sliders: **Diagnostic setting** on each Logic App (see [Supported Logic App types][Prerequisites - Supported Logic App types] for where), with the `WorkflowRuntime` log category and an **Event Hub** as destination. Leave `AllMetrics` disabled.
* :fa-code-branch: **Event Hub** that receives the diagnostics. The agent can read many Event Hubs at the same time.
* :fa-boxes: **Storage Container** for the checkpoint, the agent's read position in the Event Hub stream. Event Hubs only support client-side checkpointing.

>[!IMPORTANT]
>Use **one unique Storage Container per Event Hub**. Two Event Hubs sharing a container overwrite each other's checkpoint, and Logging stops working correctly.

## :fa-code-branch: Event Hub Entity

The Event Hub is the destination of the Logic Apps Diagnostic settings. Match every Event Hub that a Diagnostic setting sends to with an entry in the agent's [Event Hubs tab][Configuration - Event Hubs].

* Use one or more **dedicated** Event Hubs for Logic Apps diagnostics.
  >[!IMPORTANT]
  >If you also use diagnostic logging for other Azure resources, such as API Management, use different Event Hubs for each **type** of resource.
* The Event Hub must be in the **same region** as the Logic Apps that send to it ([Microsoft: Diagnostic settings destinations](https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/diagnostic-settings#destinations)<sup>:fa-arrow-up-right-from-square:</sup>).
* The Event Hub can be in a **different subscription** than your Logic Apps; map it in [Configure Event Hubs][Configuration - Event Hubs].
* Keep the number of Event Hubs small: many Diagnostic settings can share one Event Hub.
* Use at least 2 partitions.
  >[!IMPORTANT]
  >For **high volume** solutions (more than 2,000,000 events per day), you might need to re-create the Event Hub with 4 or more partitions.
* Set the retention to cover your longest expected agent outage; [Configure Event Hubs][Configuration - Event Hubs] covers tiers and cost.

![Azure Event Hub Entity][6]  
*Example of an Azure Event Hub entity used for Azure Logic Apps Logging.*  

![Event Hub Details][9]  
*Details about the Azure Event Hub entity.*  

![Event Hub Properties][7]  
*The Event Hub properties show that data arrives regularly.*  

### Additional comments about the Event Hub

Logic Apps diagnostics need their own Event Hubs:

<div class="mermaid">
graph LR
  subgraph "Integration solution"
    C["Azure Function<br/>with Serilog Logging"] --- C1("Serilog Event Hub Sink")
    A["Azure API Management Service API<br/>with Policy"] --- A1("Policy")
    B["Azure Logic App<br/>with the diagnostic setting"]
  end
  subgraph "Event Hub"
    A1 -->|"1. Nodinite JSON Log Event"| AA("EH1")
    C1 -->|"1. Nodinite JSON Log Event"| AA
    C1 -.- CC("EH2")
    B -->|"2. Azure Diagnostics log"| BB("EH3")
  end
</div>

*Diagram: (1) [Logging from Azure Functions][Serilog] and API Management can share an Event Hub when the content is a :Nodinite: [JSON Log Event][], read by the [Pickup Log Events Service Logging Agent][]. (2) Logic Apps diagnostics use another format and need their own Event Hubs.*

>[!TIP]
>Use **separate** Event Hubs per purpose. A shared Event Hub saves administration, but can cost performance and complicates pricing, scaling, retention, and partitions; see [Azure Costs for Blob Storage and Event Hub][].

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

* :fa-square-plus: [Back to Prerequisites][Prerequisites]  
* :fa-cloud: [Azure Access and Roles][Prerequisites - Azure access]  
* :fa-shield-check: [Firewall Settings][Prerequisites - Firewall]  
* :fa-code-branch: [Configure Event Hubs][Configuration - Event Hubs]  

## :fa-link-horizontal: Related Topics

* :fa-file-code: [ARM Template][]  
* :fa-book: [About Logic Apps Logging options][]  
* :fa-hard-drive: [Logging Logic Apps][]  
* :fa-coins: [Azure Costs for Blob Storage and Event Hub][]  
* :fa-hard-drive: [Azure Logic Apps Logging and Monitoring Agent][Azure Logic Apps Agent]  

[6]:{ndm}/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubs.png
[7]:{ndm}/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubProperties.png
[9]:{ndm}/Documentation%20Pictures/MonitorAgent/LogicApps/EventHubEntity.png

[About Logic Apps Logging options]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Troubleshooting/About%20Logic%20Apps%20Logging%20options.md
[ARM Template]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Troubleshooting/ARM%20Template.md
[Azure Costs for Blob Storage and Event Hub]:{ndr}/Logging%20and%20Monitoring/Custom%20Logging/Troubleshooting/Azure%20Costs%20for%20Blob%20Storage%20and%20Event%20Hub.md
[Azure Logic Apps Agent]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Overview.md
[Configuration - Event Hubs]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/3B.%20Configuration%20-%20Event%20Hubs.md
[JSON Log Event]:{ndr}/Core%20Services/Log%20Event/Features/JSON%20Log%20Event.md
[Logging Logic Apps]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Features/Logging%20Logic%20Apps.md
[Pickup Log Events Service Logging Agent]:{ndr}/Logging%20and%20Monitoring/Pickup%20LogEvents%20Service/Overview.md
[Prerequisites]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/1.%20Prerequisites.md
[Prerequisites - Azure access]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/Prerequisites/Azure%20Access%20and%20Roles.md
[Prerequisites - Firewall]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/Prerequisites/Firewall%20Settings.md
[Prerequisites - Supported Logic App types]:{ndr}/Logging%20and%20Monitoring/Azure%20Logic%20Apps/Getting%20started/1.%20Prerequisites.md#supported-logic-app-types
[Serilog]:{ndr}/Logging%20and%20Monitoring/Serilog/Overview.md