Skip to content

Operations

Log Message

This operation is similar to the Core Logger with the addition that it supports optionally using a configuration object

Parameters supported:

Name Default Optional Description
Log Level INFO Yes Log level
Category Yes Log Category
Message No Log Message

Log Map

Overview

This operation is designed to log a structured data message using a log4j MapMessage record.

If the data map provided includes any map or collection, it will be flattened as per example below:

{
  "hello": "world",
  "car": {
    "color": "blue",
    "miles": 10000,
    "tags": ["fast","large"]
  }
}

will be transformed into

{
  "hello": "world",
  "car.color": "blue",
  "car.miles": 10000,
  "car.tags.[0]": "fast",
  "car.tags.[1]": "large"
}

This operation is especially useful when combined with the JSON layout as all field will be inlined in the JSON record.

Code Location

Additionally, if the 'Include location' parameter is set (which is the default), it will add the following data to the map:

Key Value
code.location.rootContainerName Root container location (typically the flow)
code.location.filename Code file name
code.location.line Line number in code file

Parameters

Name Default Optional Description
Log Level INFO Yes Log level
Category Yes Log Category
Prefix Yes If this is set, all map keys will be prefixed with that value separated by a dot
Include code location true Yes If this is set, code location data will be added to map
Data Map No Data Map to log