Wrapper Classes

TritonFlow.FlowLog

This is a wrapper class for passing log data from flow or process builder. Use this class for all your flow logging needs. All flow-accessible properties in this class should be annotated with @InvocableVariable

For more information on invocable variables please refer to the Salesforce developer documentation.

public class FlowLog

Category

Required. This value that represents a category for the log record (see Category enum).

Type

Required. This value that represents a type for the log record (see Type enum).

Area

Required. This value that represents a functional area for the log record (see Area enum).

Summary

Required. This value that represents a short summary of the log record.

Details

Required. This value that represents a more detailed description of the log record.

InterviewGUID

Required. This value should always be set to a global flow variable $Flow.InterviewGuid. This value uniquely identifies an instance of a running flow interview and allows Pharos to group any potential error logs together with other custom logs from the same transaction.

Flow API Name

Optional. This value represents the API name of the running flow. It's a good practice to pass that along to your logs for easier searching and reporting later on.

Level

Optional. This value represents log level of the log you're creating. If this is not included, a default value of INFO will be used. See Level enum for more details.

If you pass in a value that is not included in the Level enum, an error message indicating a mismatch will be appended to the details of your flow log and the default INFO level will be used instead.

Additional Fields

Optional. This value allows passing any additional Salesforce custom fields to the log record. See Flow section for more details. Pharos Triton will accept any collection of fields on the log record in a JSON format. For example, the following input will save "summary" and "details" to pharos__Summary__c and pharos__Details__c custom fields on the log record:

{"pharos__Summary__c":"summary","pharos__Details__c":"details"}

If you pass in a value that fails to parse into a JSON object an error message indicating the same will be added to the details of your flow log.

TritonLwc.ComponentLog

This is a wrapper class for passing log data from lwc. Use this class for all your lwc logging needs. All lwc-accessible properties in this class should be annotated with @AuraEnabled

public class ComponentLog

Category

@AuraEnabled
public String category { get; set; }

This value that represents a category for the log record (see Category enum).

Type

@AuraEnabled
public String type { get; set; }

This value that represents a type for the log record (see Type enum).

Area

@AuraEnabled
public String area { get; set; }

This value that represents a functional area for the log record (see Area enum).

Summary

@AuraEnabled
public String summary { get; set; }

Required. This value that represents a short summary of the log record.

Details

@AuraEnabled
public String details { get; set; }

This value that represents a more detailed description of the log record.

TotalTime

@AuraEnabled
public Decimal totalTime { get; set; }

This value that represents the duration of an operation, in milliseconds. Use this for your profiling needs. Pharos will utilize this value to display a timeline view for custom debug and event logs.

UserId

@AuraEnabled
public String userId { get; set; }

This value represents the current running user Id. Pharos will utilize this value to associate a log record with the specified user.

RecordId

@AuraEnabled
public String recordId { get; set; }

This value represents any record Id. Use this value to pass any relevant data context to your logs. Pharos will utilize this value to associate a log record with any related objects.

ObjectApiName

@AuraEnabled
public String objectApiName { get; set; }

This value represents an API name of any related record. Use this value to identify any relevant records by their api name instead of tagging a log with a specific record.

Stack

@AuraEnabled
public String stack { get; set; }

This value represents a stack trace within an lwc component. Use this value to pass stack trace to your Pharos logs.

Error

@AuraEnabled
public Error error { get; set; }

This value represents an instance of an Error wrapper class. Use this value to package together the stack trace, type, and the error message.

Component

@AuraEnabled
public Component component { get; set; }

This value represents an instance of a Component wrapper class. Use this value to package together lwc component information such as name, function, action along with a category (see Category enum)

TransactionId

@AuraEnabled
public String transactionId { get; set; }

This value represents an transaction Id. Use this value to pass along a custom transaction Id to unify your logging under a single transaction umbrella.

CreatedTimestamp

@AuraEnabled
public Decimal createdTimestamp { get; set; }

This value represents a date/time stamp. Use this value to precisely indicate the creation date and time of your log.

Level

@AuraEnabled
public String level { get; set; }

This value represents a log level. Use this value to denote the log level for your log (see Level enum).

Duration

@AuraEnabled
public Decimal duration { get; set; }

This value represents a duration of any operation. Use this value to pass through the total execution time of an operation of your choice. Pharos will use this value to render a graphical timeline view.

TritonLwc.Component

A wrapper class for passing component info data from lwc.

Category

@AuraEnabled
public String category { get; set; }

This value that represents a category for the log record (see Category enum).

Name

@AuraEnabled
public String name { get; set; }

This value that represents the lwc component name.

Function

@AuraEnabled
public String function { get; set; }

This value represents an lwc controller function name.

Action

@AuraEnabled
public String action { get; set; }

This value represents an lwc action name.

TritonLwc.Error

A wrapper class for passing error info from lwc.

Message

@AuraEnabled
public String message { get; set; }

This value represents an error message or an error summary.

Stack

@AuraEnabled
public String stack { get; set; }

This value contains a stack trace within the LWC controller.

Type

@AuraEnabled
public String type { get; set; }

This value represents an error Type (see Type enum).

Last updated