Skip to content

FLOW_LoggerLog.DTO_Request

Class

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 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 messageLog message
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;

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

Log message

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;