LogEntryEventBuilder
LogEntryEventBuilder Class
Section titled “LogEntryEventBuilder Class”SUPPRESSWARNINGS
Builder class that generates each LogEntryEvent__e record
Group Logger Engine
See Logger
Methods
Section titled “Methods”addTag(tag)
Section titled “addTag(tag)”Appends the tag to the existing list of tags
Signature
Section titled “Signature”global LogEntryEventBuilder addTag(String tag)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| tag | String | The string to use as a tag for the current entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
addTags(tags)
Section titled “addTags(tags)”Appends the tag to the existing list of tags
Signature
Section titled “Signature”global LogEntryEventBuilder addTags(List<String> tags)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| tags | List |
The list of strings to use as tags for the current entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
getLogEntryEvent()
Section titled “getLogEntryEvent()”Returns the LogEntryEvent__e record for this instance of LogEntryEventBuilder
Signature
Section titled “Signature”global LogEntryEvent__e getLogEntryEvent()Return Type
Section titled “Return Type”The LogEntryEvent__e record
parseStackTrace(stackTraceString)
Section titled “parseStackTrace(stackTraceString)”SUPPRESSWARNINGS
Parses the provided stack trace and sets the log entry's origin & stack trace fields
Signature
Section titled “Signature”global LogEntryEventBuilder parseStackTrace(String stackTraceString)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| stackTraceString | String | The Apex stack trace string to parse |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(lockResult)
Section titled “setApprovalResult(lockResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(Approval.LockResult lockResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| lockResult | Approval.LockResult | The instance of Approval.LockResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(processResult)
Section titled “setApprovalResult(processResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(Approval.ProcessResult processResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| processResult | Approval.ProcessResult | The instance of Approval.ProcessResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(unlockResult)
Section titled “setApprovalResult(unlockResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(Approval.UnlockResult unlockResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| unlockResult | Approval.UnlockResult | The instance of Approval.UnlockResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(lockResults)
Section titled “setApprovalResult(lockResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(List<Approval.LockResult> lockResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| lockResults | List<Approval.LockResult> | The list of Approval.LockResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(processResults)
Section titled “setApprovalResult(processResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(List<Approval.ProcessResult> processResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| processResults | List<Approval.ProcessResult> | The list of Approval.ProcessResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setApprovalResult(unlockResults)
Section titled “setApprovalResult(unlockResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setApprovalResult(List<Approval.UnlockResult> unlockResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| unlockResults | List<Approval.UnlockResult> | The list of Approval.UnlockResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(deleteResult)
Section titled “setDatabaseResult(deleteResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.DeleteResult deleteResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| deleteResult | Database.DeleteResult | The instance of Database.DeleteResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(emptyRecycleBinResult)
Section titled “setDatabaseResult(emptyRecycleBinResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.EmptyRecycleBinResult emptyRecycleBinResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| emptyRecycleBinResult | Database.EmptyRecycleBinResult | The instance of Database.EmptyRecycleBinResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(leadConvertResult)
Section titled “setDatabaseResult(leadConvertResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.LeadConvertResult leadConvertResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| leadConvertResult | Database.LeadConvertResult | The instance of Database.LeadConvertResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(mergeResult)
Section titled “setDatabaseResult(mergeResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.MergeResult mergeResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| mergeResult | Database.MergeResult | The instance of Database.MergeResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(saveResult)
Section titled “setDatabaseResult(saveResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.SaveResult saveResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| saveResult | Database.SaveResult | The instance of Database.SaveResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(upsertResult)
Section titled “setDatabaseResult(upsertResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.UpsertResult upsertResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| upsertResult | Database.UpsertResult | The instance of Database.UpsertResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(undeleteResult)
Section titled “setDatabaseResult(undeleteResult)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(Database.UndeleteResult undeleteResult)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| undeleteResult | Database.UndeleteResult | The instance of Database.UndeleteResult to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(deleteResults)
Section titled “setDatabaseResult(deleteResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.DeleteResult> deleteResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| deleteResults | List<Database.DeleteResult> | The list of Database.DeleteResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(emptyRecycleBinResults)
Section titled “setDatabaseResult(emptyRecycleBinResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.EmptyRecycleBinResult> emptyRecycleBinResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| emptyRecycleBinResults | List<Database.EmptyRecycleBinResult> | The list of Database.EmptyRecycleBinResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(leadConvertResults)
Section titled “setDatabaseResult(leadConvertResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.LeadConvertResult> leadConvertResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| leadConvertResults | List<Database.LeadConvertResult> | The list of Database.LeadConvertResult s to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(mergeResults)
Section titled “setDatabaseResult(mergeResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.MergeResult> mergeResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| mergeResults | List<Database.MergeResult> | The list of Database.MergeResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(saveResults)
Section titled “setDatabaseResult(saveResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.SaveResult> saveResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| saveResults | List<Database.SaveResult> | The list of Database.SaveResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(upsertResults)
Section titled “setDatabaseResult(upsertResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.UpsertResult> upsertResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| upsertResults | List<Database.UpsertResult> | The list of Database.UpsertResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setDatabaseResult(undeleteResults)
Section titled “setDatabaseResult(undeleteResults)”Sets the log entry event's database operation result fields
Signature
Section titled “Signature”global LogEntryEventBuilder setDatabaseResult(List<Database.UndeleteResult> undeleteResults)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| undeleteResults | List<Database.UndeleteResult> | The list of Database.UndeleteResult instances to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setExceptionDetails(apexException)
Section titled “setExceptionDetails(apexException)”Sets the log entry event's exception fields
Signature
Section titled “Signature”global LogEntryEventBuilder setExceptionDetails(System.Exception apexException)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| apexException | System.Exception | The instance of an System.Exception to use. |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setField(field, fieldValue)
Section titled “setField(field, fieldValue)”Sets a field value on the builder's LogEntryEvent__e record
Signature
Section titled “Signature”global LogEntryEventBuilder setField(Schema.SObjectField field, Object fieldValue)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| field | Schema.SObjectField | The Schema.SObjectField token of the field to populate |
on the builder's LogEntryEvent__e record |
||
| fieldValue | Object | The Object value to populate in the provided field |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setField(fieldToValue)
Section titled “setField(fieldToValue)”SUPPRESSWARNINGS
Sets multiple field values on the builder's LogEntryEvent__e record
Signature
Section titled “Signature”global LogEntryEventBuilder setField(Map<Schema.SObjectField,Object> fieldToValue)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| fieldToValue | Map<Schema.SObjectField,Object> | An instance of Map<Schema.SObjectField, Object> containing the |
the fields & values to populate on the builder's LogEntryEvent__e record |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setHttpRequestDetails(request)
Section titled “setHttpRequestDetails(request)”Sets the log entry event's HTTP Request fields
Signature
Section titled “Signature”global LogEntryEventBuilder setHttpRequestDetails(System.HttpRequest request)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| request | System.HttpRequest | The instance of HttpRequest to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setHttpRequestDetails(request, headersToLog)
Section titled “setHttpRequestDetails(request, headersToLog)”Sets the log entry event's HTTP Request fields
Signature
Section titled “Signature”global LogEntryEventBuilder setHttpRequestDetails(System.HttpRequest request, List<String> headersToLog)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| request | System.HttpRequest | The instance of HttpRequest to log |
| headersToLog | List |
An instance of List<String> containing the header keys to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setHttpResponseDetails(response)
Section titled “setHttpResponseDetails(response)”Sets the log entry event's HTTP Response fields
Signature
Section titled “Signature”global LogEntryEventBuilder setHttpResponseDetails(System.HttpResponse response)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| response | System.HttpResponse | The instance of HttpResponse to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setMessage(logMessage)
Section titled “setMessage(logMessage)”Sets the log entry event's message field
Signature
Section titled “Signature”global LogEntryEventBuilder setMessage(LogMessage logMessage)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| logMessage | LogMessage | The instance of LogMessage to use to set the entry's message field |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setMessage(message)
Section titled “setMessage(message)”Sets the log entry event's message field
Signature
Section titled “Signature”global LogEntryEventBuilder setMessage(String message)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| message | String | The string to use to set the entry's message field |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecord(recordId)
Section titled “setRecord(recordId)”Sets the log entry event's record fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRecord(Id recordId)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| recordId | Id | The ID of the SObject record related to the entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecord(record)
Section titled “setRecord(record)”Sets the log entry event's record fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRecord(SObject record)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| record | SObject | The SObject record related to the entry. The JSON of the record is automatically added to the entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecord(records)
Section titled “setRecord(records)”Sets the log entry event's record fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRecord(List<SObject> records)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| records | List |
The list of SObject records related to the entry. The JSON of the list is automatically added to the entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecord(recordIdToRecord)
Section titled “setRecord(recordIdToRecord)”Sets the log entry event's record fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRecord(Map<Id,SObject> recordIdToRecord)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| recordIdToRecord | Map<Id,SObject> | The map of SObject records related to the entry. The JSON of the map is automatically added to the entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecord(recordIds)
Section titled “setRecord(recordIds)”Sets the log entry event's record fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRecord(System.Iterable<Id> recordIds)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| recordIds | System.Iterable |
The Set of SObject records ids related to the entry. Will be converted to list and the JSON of the list is automatically added to the entry |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRecordId(recordId)
Section titled “setRecordId(recordId)”Deprecated - use setRecord(Id recordId) instead
Signature
Section titled “Signature”global LogEntryEventBuilder setRecordId(Id recordId)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| recordId | Id | The id of the record to set. |
Return Type
Section titled “Return Type”An instance of LogEntryEventBuilder with a record associated wit recordId.
setRecordId(record)
Section titled “setRecordId(record)”Deprecated - use setRecord(SObject record) instead
Signature
Section titled “Signature”global LogEntryEventBuilder setRecordId(SObject record)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| record | SObject | the record to set. |
Return Type
Section titled “Return Type”An instance of LogEntryEventBuilder with the given record.
setRestRequestDetails(request)
Section titled “setRestRequestDetails(request)”Sets the log entry event's REST Request fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRestRequestDetails(System.RestRequest request)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| request | System.RestRequest | The instance of System.RestRequest to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods
setRestResponseDetails(response)
Section titled “setRestResponseDetails(response)”Sets the log entry event's REST Response fields
Signature
Section titled “Signature”global LogEntryEventBuilder setRestResponseDetails(System.RestResponse response)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| response | System.RestResponse | The instance of System.RestResponse to log |
Return Type
Section titled “Return Type”The same instance of LogEntryEventBuilder , useful for chaining methods