- 12 minutes to read

Configure Logging for Azure Logic Apps

This page covers the Logging tab of a Subscription configuration in the Nodinite Azure Logic Apps Logging and Monitoring Agent. It decides which workflow activity becomes Nodinite Log Events. The agent reads that activity from the diagnostics Event Hub, which you configure first on the Event Hubs tab; the Event Hub can be in a different subscription than the workflows. The agent fetches payloads through the Azure REST API with the App Registration on the Authentication tab. The other tabs are on the Subscription configuration page.

Understanding Logic Apps logging filters

Azure diagnostics for Logic Apps are verbose: they produce events for every trigger and every Action, in and out, including every iteration of a loop. A single run of a complex workflow can produce hundreds of thousands of Action invocations, and Azure keeps all of them in the run history for the whole retention period.

The agent reads that stream from the Event Hub, but it doesn't have to keep everything. The Logging filters decide which events become Log Events, and which of those carry payloads:

graph LR LA["fa:fa-sitemap Logic App run
every trigger, Action, and repetition"] --> EH["fa:fa-code-branch Event Hub
diagnostics stream"] LA --> RH["fa:fa-hard-drive Run history
Azure Storage"] EH --> AG["fa:fa-filter Agent filters
Actions, Tracked Properties, limits"] AG -->|"REST API: payloads for matched Actions"| RH AG -->|"Matched"| LE["fa:fa-database Nodinite Log Events
with selected payloads"] AG -.->|"Not matched"| SKIP["fa:fa-ban Not logged"] style LA fill:#2678BD style RH fill:#FFD525 style EH fill:#3F827B style AG fill:#E47528 style LE fill:#93d16d style SKIP fill:#c33d34

Diagram: The agent applies the filters to the diagnostics stream. For matched events, it fetches the payloads from the run history (yellow) through the REST API, and they become Log Events (green); everything else (red) is not logged.

Setting What it limits Default
Trigger checkboxes Whether trigger start and end, and their bodies, are logged ✅ All checked (verbose)
Limit to 1st repetition Logs only the first iteration of Actions inside loops ✅ Checked
Max Log Events for Repetitions Caps logged iterations per repeated Action, 1 to 1,000 ❌ Disabled while Limit to 1st repetition is checked
Max Log Events for Actions Caps the number of Action records logged per run, 1 to 50,000 1,000
Filter Configurations Logs only Actions whose name, and optionally Tracked Property, matches a RegEx ❌ None (all Actions)
Workflow logging exclusion filter Skips whole workflows, by name, Logic App, or resource group ❌ None (all workflows)

The result is a Nodinite history that holds the business-relevant steps, such as the receive and the send of a message, instead of every internal step. Your users then find them in Log Views, and the Message Types of the logged payloads decide how long Nodinite keeps them and which Search Fields it extracts. This is also why Nodinite storage can be a small fraction of what Azure keeps; see Reduce Azure Logic Apps Run History Retention to Lower TCO and About Logic Apps Logging options.

Logging tab

Note

The Diagnostics logging feature in Azure for Logic Apps produces verbose logging. You can limit the events that actually get logged to Nodinite.

To enable Logging, and the Failed Runs and Failed Triggers Monitoring (Monitoring Logic Apps), you must enable the Logging feature and set the required filter settings as described in this section.

Tip

We highly recommend that you follow the guidelines in this section as this is our design idea.

There are two different types of Logging settings; Successful runs and Failed runs.

graph TD subgraph "fa:fa-sitemap Logic App Workflow" subgraph "fa:fa-square-plus Successful runs" roSRTS["fa:fa-bolt Trigger settings"] roSRAS["fa:fa-exchange-alt Action settings"] end subgraph "fa:fa-square-xmark Failed runs" roFRTS["fa:fa-bolt Trigger settings"] roFRAS["fa:fa-exchange-alt Action settings"] end end subgraph "Nodinite" roLE["Log Event"] roSRTS -.->|"Filter"| roLE roSRAS -.->|"Filter"| roLE roFRTS -.->|"Filter"| roLE roFRAS -.->|"Filter"| roLE end

Diagram: Successful runs and failed runs each have their own Trigger and Action settings, and each set filters what becomes a Log Event.

Important

These settings are mutually exclusive!

Basic tab (Logging)

Apply the essential Logging settings.

  • Enable logging - When checked; Runs (events and payload) are logged from your Logic Apps
  • LogAPI URI - The Log API URI for the specified Nodinite instance, e.g. 'https://nodinite.contoso.com:40002/LogAPI/'; the host and port come from your environment's settings in the Nodinite Portal (Servers step). The agent must reach this port; see Prerequisites - Firewall settings
  • Log Agent Value Id - A positive integer (Id) identifying this Log Agent; the agent stamps its Log Events with this Id. The default for the Azure Logic Apps agent is 5

    Important

    You should not change the LogAgentId once set, because the Log Events that Nodinite has already logged are tied to this particular Log Agent Value Id.

Logging options - Basic tab (6.1.0.11)
The Basic tab of the Logging settings with the Log API address and the Log Agent Value Id.

  • Workflow logging exclusion filter - Workflows whose runs are not logged; see below

Workflow logging exclusion filter

Some workflows produce runs nobody needs in Nodinite, such as a health probe that runs every minute or a test workflow in a shared resource group. The Workflow logging exclusion filter stops the agent from logging the runs of the workflows you name, while it keeps monitoring them: their state, Failed runs, and thresholds are unchanged.

Important

Don't confuse it with the Workflow exclusion filter on the Workflows tab, which works the other way around: it hides workflows from Monitoring and doesn't stop logging.

Workflow exclusion filter (Workflows tab) Workflow logging exclusion filter (Logging tab)
Effect The workflow is not a Monitoring resource New runs are not logged
Matched against The workflow name The workflow name, LogicApp/Workflow (Standard), and rg:ResourceGroup/...
Fields Filter Enabled, Description, Filter expression
Defaults ^Artifacts$, ^workflow-designtime$, ^lib$ (always added back) Empty
Resource group override ❌ No ✅ Yes

The Logging tab's Basic tab with Enable Logging, LogAPI URI, Log Agent Value Id, and the start of the Workflow logging exclusion filter list
The list sits on the Basic tab of the Logging tab, below the Log Agent Value Id.

Click Add to add a filter. Each filter has three fields:

Field Required Meaning
Enabled — When checked, the filter is in use. A disabled filter is ignored, and its title shows a red icon
Description ✅ Yes What the filter excludes. The agent stores it on every run the filter excludes, as Excluded by logging exclude filter '<Description>'
Filter expression ✅ Yes A .NET regular expression, matched against the names below

Two workflow logging exclusion filters: Order workflow in Logic App la-orders, enabled, and All workflows in resource group rg-test, disabled with a red ban icon
An enabled filter for one Standard workflow, and a disabled one for a whole resource group.

What the expression is matched against

The agent tests each workflow against up to three names; a match on any one of them excludes the workflow.

Name form Consumption Standard
Workflow name Order Order
Logic App / Workflow (same as above) la-orders/Order
rg: + resource group + / + name rg:rg-prod/Order rg:rg-prod/la-orders/Order

rg: is a literal prefix that the agent adds; it isn't part of any Azure name (Azure names can't contain :). It keeps the resource-group form apart from the LogicApp/Workflow form.

Goal Filter expression
Every workflow named Order, in all Logic Apps of both types ^Order$
One Standard workflow ^la-orders/Order$
All workflows in one Standard Logic App ^la-orders/
One Consumption workflow in one resource group ^rg:rg-prod/Order$
Everything in a resource group ^rg:rg-prod/
One Standard workflow, pinned to its resource group ^rg:rg-prod/la-orders/Order$
Several workflows ^la-orders/(Order\|Invoice)$
How the filter behaves
  • Anchor every expression. Matching ignores case and is not anchored, so Order also matches ReOrder-wf. Start with ^ and end with $ unless you mean a prefix.
  • Resource groups can override the list. The filters belong to the subscription. When Override the global filter Logging settings is checked on a resource group, that resource group's own list replaces the subscription's list there; an empty override list excludes nothing in that resource group. See the Resource groups tab.
  • Only new runs are affected. A filter applies to runs collected while it's enabled. Runs already waiting to be sent are still logged, and removing a filter doesn't log the runs it excluded earlier.
  • Excluded runs stay visible in the agent. The agent keeps them in its database with the logging status Ignore and the description above, but doesn't send them to Nodinite.
  • No restart. A change applies from the next collection batch.
Validation and safety

Save checks every filter, even when Enable Logging is unchecked:

Code Problem
SUB-011 A filter without a Description
SUB-012 A filter without a Filter expression
SUB-013 The Filter expression isn't a valid regular expression; the message shows why

Error while saving the configuration: the workflow logging exclusion filter Order workflow in Logic App la-orders is not a valid RegEx, not enough closing parentheses
SUB-013: the expression is missing a closing parenthesis, so the configuration isn't saved.

When in doubt, the agent logs the run (it fails open), and it writes an error to its log:

  • A filter that turns out to be invalid at runtime is ignored.
  • A single match may take at most 100 ms, and each filter has a budget of 2 seconds of matching per configuration. A filter that exceeds either is ignored until the configuration changes.
  • An agent database that is still on version 6.0.0.64 can't store exclusions. Runs are then logged as usual, with the warning WorkflowRuns_Insert does not accept the logging exclude parameters yet; update the agent to get the exclusions.

Successful runs (global)

In the 'Successful runs' tab you set the Logging options for Successful runs. There is another setting for Failed runs.

There are two types of filters to set:

Global Successful Runs Settings (6.1.0.11)
The global Successful runs tab, with its Trigger and Actions sub-tabs.

Trigger (Global)

Settings about the Trigger. For successful runs, you may want to uncheck these checkboxes down to your minimum requirement, to reduce the verbose logging that is enabled by default.

Global Trigger settings for Successful runs (6.1.0.11)
All Trigger checkboxes are checked by default, which gives verbose logging.

  • Log Trigger start - When checked; Log the input of Trigger
  • Log input body - When checked; Log the body of the input
  • Log Trigger end - When checked; Log the output of Trigger
  • Log output body - When checked; Log the body of the output

Actions (Global)

Use the settings available in the Actions tab to filter events from connectors in your workflows. There are two main parts to consider here, Limits and Filter Configurations.

The purpose of the Limits is to reduce the net amount of Nodinite Log Events.

  • Limit to 1st repetition - When checked (Default); Log only the 1st repetition found in Actions. Checked also disables the Max Log Events for Repetitions checkbox.
  • Max Log Events for RepetitionsNew 6.1.0.11 - Set the maximum number of records to log within any Workflow run action repetition. The value range is 1 to 1000.
  • Max Log Events for ActionsNew 6.1.0.11 - Set the maximum number of Action records to log per run. The value range is 1 to 50,000.

    Note

    The Default is 1000(!)

  • Filter configurations - Add one or more filter configurations to create Log Events based on Action names AND Tracked Property names.

Actions tab - Successful runs - Global section
The Actions tab with the Limits and the Filter configurations.

Filter Configurations

Note

By default, the Logging is Verbose (with a limit on the max number of Log EventsNew 6.1.0.11). Whenever you add one or more Filters, the agent creates the Log Event if there is a match on either the Action name, AND the name of the Tracked Property. Each Filter entry has an OR in between.

Click the button to Add a new Filter entry: Add new Filter button (6.1.0.11)
Example of the Add button for a new Filter entry.

Expand the accordion to reveal the settings. There are tabs with different settings.

  1. Basic
  2. Actions
  3. Tracked Properties
Basic Tab (Filter Configuration Entry)
  • Enabled - When checked, this configuration is in use
  • Description - User-friendly filter configuration description
  • Log input body - When checked; Log the body of the input
  • Log output body - When checked; Log the body of the output
  • Log input tracked properties - When checked; Log context properties of the input
  • Log output tracked properties - When checked; Log context properties of the output

Basic Tab - Filter Configuration Entry (6.1.0.11)
The Basic tab decides whether a matched Action logs its bodies and its tracked properties.

Logged tracked properties become context properties on the Log Event, which you can use in Search Field Expressions to make the data searchable.

Actions Tab (Filter Configuration Entry)

Here, you apply the filter based on the name of the shape in your Logic Apps Workflow. There can be any number of such Filters.

  • Action Filter configurations - Add one or more filter configurations to include Log Events based on Action names. If there are no entries, then all Actions are included in the Logging. Actions tab - Filter Configuration Entry (6.1.0.11)
    An empty list of Action filters logs all Actions.

Click the button to Add a new RegEx-based Action Filter. There can be any number of such entries. Add new Actions Filter button (6.1.0.11)
Example of a RegEx-based Action filter entry.

Tip

Make it easy for yourself and others. Set a common name like Logging in the filter and then apply this to the shapes in your workflows where Logging is required. This pattern is very easy to understand and the filter configuration is dead simple. Logic Apps workflow with Actions named for Logging
Example of a workflow where the Actions to log carry the name Logging.

Important

There is an AND between the Actions tab and the Tracked Properties Tab for a single Filter entry.

Tracked Properties Tab (Filter Configuration Entry)

Here, you apply the filter based on the name of the Tracked Property in the output shape of your Logic Apps Workflow. There can be any number of such Filters. Tracked Properties Filter Tab (6.1.0.11)
The Tracked Properties tab of a Filter configuration entry.

Click the button to Add a new RegEx-based Tracked Property Filter. There can be any number of such entries. Tracked Properties Filter Entry (6.1.0.11)
Example of a RegEx-based Tracked Property filter entry.

The following image depicts an example of usage. Tracked Properties Filter example in an Azure Logic App Workflow
Example of a Tracked Property in a Logic App Action that the filter matches.

Important

You should most likely add Actions filters, as adding a single tracked properties filter limits the Logging to only output shapes containing a match on the name of the Tracked Property. Remember that our proposition is to have a single Actions filter with the name: Logging.

Failed runs (global)

In the 'Failed runs' tab you set the Logging options for Failed runs. There are other similar settings for Successful runs.

  • Failed runs - If you're only interested in the runs that fail, check the checkboxes you need.

  • Trigger

  • Actions

Failed runs - Global (6.1.0.11)
The global Failed runs tab, with the same Trigger and Actions settings as for successful runs.

Note

The settings for Failed runs are essentially identical to Successful runs, hence, the documentation is not repeated.

Tip

You can supersede the global Logging settings for each Resource Group; see the Resource groups tab. To review the Logging settings that apply to a Logic App, use Log Configuration Details.

Next Steps