Skip to content

FLOW_LoggerLog.DTO_Request ​

Class · Group: Logging

Learn it: Logging guide

apex
global inherited sharing class FLOW_LoggerLog.DTO_Request

Input parameters for logging a Flow event.


Fields ​

FieldDescription
global String additionalContextAdditional context to include with the log entry
global String correlationIdCorrelation ID from Start Flow Correlation
global String flowNameThe name of the Flow this event belongs to.
global String flowStepCurrent step/screen name for context
global String logLevelThe log level: Debug, Info, Warning, or Error (stored as DEBUG, INFO, WARN, or ERROR).
global String messageThe text of the log entry.
global Id recordIdOptional record to associate with this log entry.

additionalContext ​

apex
@InvocableVariable(description='Additional context to include with the log entry' label='Additional Context') global String additionalContext

Type: String

Additional context to include with the log entry

Example

apex
String value = instance.additionalContext;

correlationId ​

apex
@InvocableVariable(required=true description='Correlation ID from Start Flow Correlation' label='Correlation ID') global String correlationId

Type: String

Correlation ID from Start Flow Correlation

Example

apex
String value = instance.correlationId;

flowName ​

apex
@InvocableVariable(description='The name of the Flow this event belongs to. Filled in, the entry is filed under the Flow and the step stays in the location text; left blank, the entry is filed under the step, as before.' label='Flow Name') global String flowName

Type: String

The name of the Flow this event belongs to. Filled in, the entry names the Flow as its source and keeps the step in its location text; left blank, the entry names the step, as before.

Example

apex
String value = instance.flowName;

flowStep ​

apex
@InvocableVariable(description='Current step/screen name for context' label='Flow Step') global String flowStep

Type: String

Current step/screen name for context

Example

apex
String value = instance.flowStep;

logLevel ​

apex
@InvocableVariable(description='Pick Debug, Info, Warning, or Error. Defaults to Info when left empty. Stored values are DEBUG, INFO, WARN, and ERROR.' label='Log Level') global String logLevel

Type: String

The log level: Debug, Info, Warning, or Error (stored as DEBUG, INFO, WARN, or ERROR). Defaults to INFO when left empty.

Example

apex
String value = instance.logLevel;

message ​

apex
@InvocableVariable(required=true description='Log message' label='Message') global String message

Type: String

The text of the log entry. It is saved with "[Flow] " in front of it, so entries written from a Flow are easy to tell apart from entries written by Apex.

Example

apex
String value = instance.message;

recordId ​

apex
@InvocableVariable(description='Optional record to associate with this log entry' label='Record ID') global Id recordId

Type: Id

Optional record to associate with this log entry. When set, the record is linked to the log entry so every log for that record can be filtered and reported on together. Leave blank when the log is not about a specific record.

Example

apex
Id value = instance.recordId;