Flow Logging

Overview

📘

Avilable starting from OpenLegacy Core version 5.1.0

Flow logging provides a comprehensive audit trail of metadata for every flow execution. It captures critical information such as the trigger source, execution path, step durations, and data payloads.

At the conclusion of each flow run, all metadata is emitted as a single structured JSON log entry via the logger io.openlegacy.flow.* at the INFO level.


Configuration

You can customize the depth of your logs using two independent dimensions. These can be defined in your application.yaml or via environment variables.

Logging Dimensions

SettingControls
log-input-outputDetermines if the trigger payload and flow response body are included.
step-levelDetermines the level of detail captured for each individual step.

Configuration Examples

YAML Setup

flow:
  logging:
    log-input-output: false   # Default
    step-level: none          # Options: none, basic, full

Environment Variables

  • OL_FLOW_LOGGING_LOG_INPUT_OUTPUT=true
  • OL_FLOW_LOGGING_STEP_LEVEL=full

Step-Level Detail Values

ValueSteps in Log?Runtime Data Included?Details Captured
noneNoNoOnly top-level flow metadata.
basicYesNoName, type, duration, path, and status.
fullYesYesAll runtime data (inputs, outputs, connections).

Log Structure

Each log entry follows a consistent schema, allowing for easy parsing by monitoring tools.

Example Schema

{
  "flowName": "get-customer-flow",
  "durationMs": 142,
  "success": true,
  "errorMessage": null,
  "input": { ... },
  "output": { ... },
  "steps": [ ... ]
}

Field Reference

FieldAlways PresentDescription
flowNameYesUnique identifier for the flow.
durationMsYesTotal execution time in milliseconds.
successYestrue if the status code is 2xx.
errorMessageOn failureDetailed exception or error description.
inputOptional*Request metadata (depends on log-input-output).
outputOptional*Response metadata (depends on log-input-output).
stepsOptional**List of step metadata (depends on step-level).

Input & Output Structure

The shape of the input and output objects varies based on the trigger type used to start the flow.

Trigger TypeInput ExampleOutput Example
HTTP (WebFlux)Method, URL, ContentType, Origin, Headers, BodyhttpCode, Headers, Body
KafkaTopic, BodyTopic, Body
IBM / ActiveMQQueue, Mode, BodyQueue, Body
AS/400 CDCTables, BodyN/A
VSAM DatasetvsamPath, BodyN/A

Note on Data Privacy: When log-input-output is set to false (the default), the body field is always returned as an empty object {}. All other technical metadata (URLs, topics, queues) remains visible for diagnostic purposes.