Log configuration

Log configuration

By default, the Log function logs all events of a stream as the stream is running.

If you want to collect specific events, you can configure the Log function by adding a JSON schema in the Key field to define what you want to log. If you want to log just part of the output, you can specify the key(s) you want to log.

LogConfig.png

For example, if you have the keys of value and timestamp, but you only want to see the value data in your logs, enter:

[ "value" ]

The following will then be visible in the log:

{"value": 1} {"value": 2} {"value": 3}

Syntax

Below are some examples of keys that you can specify in the Key field to log data using the Log function:

Logging a single field

[ "value" ]

Logging multiple fields

[ "value", "fast", "bar" ]

Logging an object

[ "object" ]

Logging fields from a record with an object (nested structure)

For example, if you have a record with the structure:

{ "brand1": { "model": 1 }, "brand2":  2}'

And you only want to log the value of the model, you can enter:

[ brand1.model ]

The following will then be visible in the log:

{ "brand1": { "model": 1 } }