> For the complete documentation index, see [llms.txt](https://triton.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://triton.pharos.ai/methods-reference/apex-methods-reference/tritonflow/flowlog.md).

# FlowLog

Documentation for the FlowLog wrapper class used to structure and transmit log data from Flow Builder and Process Builder.

The FlowLog class provides a wrapper for passing log data from Flow or Process Builder.

## Properties

{% code lineNumbers="true" %}

```apex
@InvocableVariable(Required=false Label='Category')
global String category;               // Log category (defaults to Flow)

@InvocableVariable(Required=false Label='Type')
global String type;                   // Log type

@InvocableVariable(Required=true Label='Area')
global String area;                   // Functional area

@InvocableVariable(Required=false Label='Operation')
global String operation;              // Operation name

@InvocableVariable(Required=true Label='Summary')
global String summary;                // Log summary

@InvocableVariable(Required=false Label='Details')
global String details;                // Log details

@InvocableVariable(Required=true Label='Interview GUID')
global String interviewGUID;          // Flow interview identifier

@InvocableVariable(Required=false Label='Flow API Name')
global String flowApiName;            // Flow API name

@InvocableVariable(Required=false Label='Flow Version')
global String flowVersion;            // Flow version number, as text

@InvocableVariable(Required=false Label='Level')
global String level;                  // Log level (defaults to INFO)

@InvocableVariable(Required=false Label='Transaction ID')
global String transactionId;          // Transaction identifier for log grouping

@InvocableVariable(Required=false Label='Additional Fields')
global String additionalFields;       // JSON string of additional custom fields

@InvocableVariable(Required=false Label='Stacktrace')
global String stacktrace;             // Current stacktrace

@InvocableVariable(Required=false Label='Full Stacktrace')
global String fullStacktrace;         // Complete stacktrace including previous traces
```

{% endcode %}

## Field Reference

### Core Fields

| Field            | Required | Default | Description                                                                                                       |
| ---------------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
| category         | No       | Flow    | Category classification for the log                                                                               |
| type             | No       | -       | Technical classification of the log entry                                                                         |
| area             | Yes      | -       | Functional area the log relates to                                                                                |
| summary          | Yes      | -       | Brief description of the log entry                                                                                |
| details          | No       | -       | Detailed information about the log entry                                                                          |
| interviewGUID    | Yes      | -       | Flow interview identifier ($Flow\.InterviewGuid)                                                                  |
| flowApiName      | No       | -       | **Plain** API name of the Flow — no version suffix ([why](/flows.md#flow-api-name-and-flow-version))              |
| flowVersion      | No       | -       | Version number of the Flow, passed as text. An unparsable value adds a note to Details instead of failing the log |
| level            | No       | INFO    | Log level for the entry                                                                                           |
| operation        | No       | -       | Name of the operation being performed                                                                             |
| additionalFields | No       | -       | JSON string of additional custom fields                                                                           |
| transactionId    | No       | -       | Transaction identifier for grouping related logs                                                                  |
| stacktrace       | No       | -       | Current stacktrace information                                                                                    |
| fullStacktrace   | No       | -       | Complete stacktrace including previous traces                                                                     |

### Additional Fields Format

The additionalFields property accepts a JSON string mapping field API names to values:

{% code lineNumbers="true" %}

```json
{
    "pharos__Summary__c": "Custom summary",
    "pharos__Details__c": "Custom details"
}
```

{% endcode %}

Note: If the JSON string fails to parse, an error message will be added to the log details.

## FlowLogOutput

The [`log`](/methods-reference/apex-methods-reference/tritonflow.md#log) invocable returns a `List<FlowLogOutput>` — one per input `FlowLog` — carrying stacktrace information back to the Flow for chained error tracking.

{% code lineNumbers="true" %}

```apex
@InvocableVariable(Required=false Label='Stacktrace')
global String stacktrace;             // Current stacktrace

@InvocableVariable(Required=false Label='Full Stacktrace')
global String fullStacktrace;         // Combined stacktrace including previous traces
```

{% endcode %}
