Skip to content

LogEntryEventBuilder

SUPPRESSWARNINGS

Builder class that generates each LogEntryEvent__e record

Group Logger Engine

See Logger

Appends the tag to the existing list of tags

global LogEntryEventBuilder addTag(String tag)
Name Type Description
tag String The string to use as a tag for the current entry

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Appends the tag to the existing list of tags

global LogEntryEventBuilder addTags(List<String> tags)
Name Type Description
tags List The list of strings to use as tags for the current entry

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Returns the LogEntryEvent__e record for this instance of LogEntryEventBuilder

global LogEntryEvent__e getLogEntryEvent()

LogEntryEvent__e

The LogEntryEvent__e record


SUPPRESSWARNINGS

Parses the provided stack trace and sets the log entry's origin & stack trace fields

global LogEntryEventBuilder parseStackTrace(String stackTraceString)
Name Type Description
stackTraceString String The Apex stack trace string to parse

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(Approval.LockResult lockResult)
Name Type Description
lockResult Approval.LockResult The instance of Approval.LockResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(Approval.ProcessResult processResult)
Name Type Description
processResult Approval.ProcessResult The instance of Approval.ProcessResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(Approval.UnlockResult unlockResult)
Name Type Description
unlockResult Approval.UnlockResult The instance of Approval.UnlockResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(List<Approval.LockResult> lockResults)
Name Type Description
lockResults List<Approval.LockResult> The list of Approval.LockResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(List<Approval.ProcessResult> processResults)
Name Type Description
processResults List<Approval.ProcessResult> The list of Approval.ProcessResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setApprovalResult(List<Approval.UnlockResult> unlockResults)
Name Type Description
unlockResults List<Approval.UnlockResult> The list of Approval.UnlockResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.DeleteResult deleteResult)
Name Type Description
deleteResult Database.DeleteResult The instance of Database.DeleteResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.EmptyRecycleBinResult emptyRecycleBinResult)
Name Type Description
emptyRecycleBinResult Database.EmptyRecycleBinResult The instance of Database.EmptyRecycleBinResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.LeadConvertResult leadConvertResult)
Name Type Description
leadConvertResult Database.LeadConvertResult The instance of Database.LeadConvertResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.MergeResult mergeResult)
Name Type Description
mergeResult Database.MergeResult The instance of Database.MergeResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.SaveResult saveResult)
Name Type Description
saveResult Database.SaveResult The instance of Database.SaveResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.UpsertResult upsertResult)
Name Type Description
upsertResult Database.UpsertResult The instance of Database.UpsertResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(Database.UndeleteResult undeleteResult)
Name Type Description
undeleteResult Database.UndeleteResult The instance of Database.UndeleteResult to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.DeleteResult> deleteResults)
Name Type Description
deleteResults List<Database.DeleteResult> The list of Database.DeleteResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.EmptyRecycleBinResult> emptyRecycleBinResults)
Name Type Description
emptyRecycleBinResults List<Database.EmptyRecycleBinResult> The list of Database.EmptyRecycleBinResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.LeadConvertResult> leadConvertResults)
Name Type Description
leadConvertResults List<Database.LeadConvertResult> The list of Database.LeadConvertResult s to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.MergeResult> mergeResults)
Name Type Description
mergeResults List<Database.MergeResult> The list of Database.MergeResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.SaveResult> saveResults)
Name Type Description
saveResults List<Database.SaveResult> The list of Database.SaveResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.UpsertResult> upsertResults)
Name Type Description
upsertResults List<Database.UpsertResult> The list of Database.UpsertResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's database operation result fields

global LogEntryEventBuilder setDatabaseResult(List<Database.UndeleteResult> undeleteResults)
Name Type Description
undeleteResults List<Database.UndeleteResult> The list of Database.UndeleteResult instances to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's exception fields

global LogEntryEventBuilder setExceptionDetails(System.Exception apexException)
Name Type Description
apexException System.Exception The instance of an System.Exception to use.

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets a field value on the builder's LogEntryEvent__e record

global LogEntryEventBuilder setField(Schema.SObjectField field, Object fieldValue)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


SUPPRESSWARNINGS

Sets multiple field values on the builder's LogEntryEvent__e record

global LogEntryEventBuilder setField(Map<Schema.SObjectField,Object> fieldToValue)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's HTTP Request fields

global LogEntryEventBuilder setHttpRequestDetails(System.HttpRequest request)
Name Type Description
request System.HttpRequest The instance of HttpRequest to log

LogEntryEventBuilder

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

global LogEntryEventBuilder setHttpRequestDetails(System.HttpRequest request, List<String> headersToLog)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's HTTP Response fields

global LogEntryEventBuilder setHttpResponseDetails(System.HttpResponse response)
Name Type Description
response System.HttpResponse The instance of HttpResponse to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's message field

global LogEntryEventBuilder setMessage(LogMessage logMessage)
Name Type Description
logMessage LogMessage The instance of LogMessage to use to set the entry's message field

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's message field

global LogEntryEventBuilder setMessage(String message)
Name Type Description
message String The string to use to set the entry's message field

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's record fields

global LogEntryEventBuilder setRecord(Id recordId)
Name Type Description
recordId Id The ID of the SObject record related to the entry

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's record fields

global LogEntryEventBuilder setRecord(SObject record)
Name Type Description
record SObject The SObject record related to the entry. The JSON of the record is automatically added to the entry

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's record fields

global LogEntryEventBuilder setRecord(List<SObject> records)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's record fields

global LogEntryEventBuilder setRecord(Map<Id,SObject> recordIdToRecord)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's record fields

global LogEntryEventBuilder setRecord(System.Iterable<Id> recordIds)
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

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Deprecated - use setRecord(Id recordId) instead

global LogEntryEventBuilder setRecordId(Id recordId)
Name Type Description
recordId Id The id of the record to set.

LogEntryEventBuilder

An instance of LogEntryEventBuilder with a record associated wit recordId.


Deprecated - use setRecord(SObject record) instead

global LogEntryEventBuilder setRecordId(SObject record)
Name Type Description
record SObject the record to set.

LogEntryEventBuilder

An instance of LogEntryEventBuilder with the given record.


Sets the log entry event's REST Request fields

global LogEntryEventBuilder setRestRequestDetails(System.RestRequest request)
Name Type Description
request System.RestRequest The instance of System.RestRequest to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods


Sets the log entry event's REST Response fields

global LogEntryEventBuilder setRestResponseDetails(System.RestResponse response)
Name Type Description
response System.RestResponse The instance of System.RestResponse to log

LogEntryEventBuilder

The same instance of LogEntryEventBuilder , useful for chaining methods