The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.
Builder class that generates each LogEntryEvent__e record
LogEntryEventBuilder(LoggerSettings__c userSettings, System.LoggingLevel entryLoggingLevel, Boolean shouldSave)Used by Logger to instantiate a new instance of LogEntryEventBuilder
| Param | Description |
|---|---|
userSettings |
The instance of LoggerSettings__c for the current to use to control any feature flags |
entryLoggingLevel |
The LoggingLevel value to use for the log entry |
shouldSave |
Indicates if the builder's instance of LogEntryEvent__e should be saved |
ENTRY_SAVE_REASON_LOGGING_LEVEL_MET → StringENTRY_SAVE_REASON_OVERRIDE → StringaggregateQueriesMax → IntegerasyncCallsMax → IntegercalloutsMax → IntegercpuTimeMax → IntegerdmlRowsMax → IntegerdmlStatementsMax → IntegeremailInvocationsMax → IntegerfutureCallsMax → IntegerheapSizeMax → IntegerisDataMaskingEnabled → BooleanmobilePushApexCallsMax → IntegerpublishImmediateDmlStatementsMax → IntegerqueueableJobsMax → IntegersoqlQueriesMax → IntegersoqlQueryLocatorRowsMax → IntegersoqlQueryRowsMax → IntegersoslSearchesMax → IntegertextField → Schema.SObjectFieldtextValue → StringwasMasked → BooleanwasTruncated → BooleanTextFieldValueCleaner(LoggerSettings__c settings, Schema.SObjectField textField, String originalTextValue) → publicaddTag(String tag) → LogEntryEventBuilderAppends the tag to the existing list of tags
| Param | Description |
|---|---|
tag |
The string to use as a tag for the current entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
addTags(List<String> tags) → LogEntryEventBuilderAppends the tag to the existing list of tags
| Param | Description |
|---|---|
tags |
The list of strings to use as tags for the current entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
getLogEntryEvent() → LogEntryEvent__eReturns the LogEntryEvent__e record for this instance of LogEntryEventBuilder
Type
LogEntryEvent__e
Description
The LogEntryEvent__e record
parseStackTrace(String stackTraceString) → LogEntryEventBuilderParses the provided stack trace and sets the log entry's origin & stack trace fields
| Param | Description |
|---|---|
stackTraceString |
The Apex stack trace string to parse |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(Approval.LockResult lockResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
lockResult |
The instance of Approval.LockResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(Approval.ProcessResult processResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
processResult |
The instance of Approval.ProcessResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(Approval.UnlockResult unlockResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
unlockResult |
The instance of Approval.UnlockResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(List<Approval.LockResult> lockResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
lockResults |
The list of Approval.LockResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(List<Approval.ProcessResult> processResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
processResults |
The list of Approval.ProcessResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setApprovalResult(List<Approval.UnlockResult> unlockResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
unlockResults |
The list of Approval.UnlockResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.DeleteResult deleteResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
deleteResult |
The instance of Database.DeleteResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.EmptyRecycleBinResult emptyRecycleBinResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
emptyRecycleBinResult |
The instance of Database.EmptyRecycleBinResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.LeadConvertResult leadConvertResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
leadConvertResult |
The instance of Database.LeadConvertResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.MergeResult mergeResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
mergeResult |
The instance of Database.MergeResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.SaveResult saveResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
saveResult |
The instance of Database.SaveResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.UpsertResult upsertResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
upsertResult |
The instance of Database.UpsertResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(Database.UndeleteResult undeleteResult) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
undeleteResult |
The instance of Database.UndeleteResult to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.DeleteResult> deleteResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
deleteResults |
The list of Database.DeleteResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.EmptyRecycleBinResult> emptyRecycleBinResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
emptyRecycleBinResults |
The list of Database.EmptyRecycleBinResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.LeadConvertResult> leadConvertResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
leadConvertResults |
The list of Database.LeadConvertResults to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.MergeResult> mergeResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
mergeResults |
The list of Database.MergeResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.SaveResult> saveResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
saveResults |
The list of Database.SaveResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.UpsertResult> upsertResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
upsertResults |
The list of Database.UpsertResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setDatabaseResult(List<Database.UndeleteResult> undeleteResults) → LogEntryEventBuilderSets the log entry event's database operation result fields
| Param | Description |
|---|---|
undeleteResults |
The list of Database.UndeleteResult instances to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setExceptionDetails(System.Exception apexException) → LogEntryEventBuilderSets the log entry event's exception fields
| Param | Description |
|---|---|
apexException |
The instance of an System.Exception to use. |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setField(Schema.SObjectField field, Object fieldValue) → LogEntryEventBuilderSets a field value on the builder's LogEntryEvent__e record
| Param | Description |
|---|---|
field |
The Schema.SObjectField token of the field to populate |
fieldValue |
The Object value to populate in the provided field |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setField(Map<Schema.SObjectField, Object> fieldToValue) → LogEntryEventBuilderSets multiple field values on the builder's LogEntryEvent__e record
| Param | Description |
|---|---|
fieldToValue |
An instance of Map<Schema.SObjectField, Object> containing the |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setHttpRequestDetails(System.HttpRequest request) → LogEntryEventBuilderSets the log entry event's HTTP Request fields
| Param | Description |
|---|---|
request |
The instance of HttpRequest to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setHttpRequestDetails(System.HttpRequest request, List<String> headersToLog) → LogEntryEventBuilderSets the log entry event's HTTP Request fields
| Param | Description |
|---|---|
request |
The instance of HttpRequest to log |
headersToLog |
An instance of List<String> containing the header keys to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setHttpResponseDetails(System.HttpResponse response) → LogEntryEventBuilderSets the log entry event's HTTP Response fields
| Param | Description |
|---|---|
response |
The instance of HttpResponse to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setLoggingContext(LoggingContext loggingContext) → voidThis is only intended to be used internally by Nebula Logger, and is subject to change.
| Param | Description |
|---|---|
loggingContext |
Variables specific to the current Logger state |
setMessage(LogMessage logMessage) → LogEntryEventBuilderSets the log entry event's message field
| Param | Description |
|---|---|
logMessage |
The instance of LogMessage to use to set the entry's message field |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setMessage(String message) → LogEntryEventBuilderSets the log entry event's message field
| Param | Description |
|---|---|
message |
The string to use to set the entry's message field |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecord(Id recordId) → LogEntryEventBuilderSets the log entry event's record fields
| Param | Description |
|---|---|
recordId |
The ID of the SObject record related to the entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecord(SObject record) → LogEntryEventBuilderSets the log entry event's record fields
| Param | Description |
|---|---|
record |
The SObject record related to the entry. The JSON of the record is automatically added to the entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecord(List<SObject> records) → LogEntryEventBuilderSets the log entry event's record fields
| Param | Description |
|---|---|
records |
The list of SObject records related to the entry. The JSON of the list is automatically added to the entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecord(Map<Id, SObject> recordIdToRecord) → LogEntryEventBuilderSets the log entry event's record fields
| Param | Description |
|---|---|
recordIdToRecord |
The map of SObject records related to the entry. The JSON of the map is automatically added to the entry |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecord(System.Iterable<Id> recordIds) → LogEntryEventBuilderSets the log entry event's record fields
| Param | Description |
|---|---|
recordIds |
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 |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRecordId(Id recordId) → LogEntryEventBuilderDeprecated - use setRecord(Id recordId) instead
| Param | Description |
|---|---|
recordId |
The id of the record to set. |
Type
LogEntryEventBuilder
Description
An instance of LogEntryEventBuilder with a record associated wit recordId.
setRecordId(SObject record) → LogEntryEventBuilderDeprecated - use setRecord(SObject record) instead
| Param | Description |
|---|---|
record |
the record to set. |
Type
LogEntryEventBuilder
Description
An instance of LogEntryEventBuilder with the given record.
setRestRequestDetails(System.RestRequest request) → LogEntryEventBuilderSets the log entry event's REST Request fields
| Param | Description |
|---|---|
request |
The instance of System.RestRequest to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setRestResponseDetails(System.RestResponse response) → LogEntryEventBuilderSets the log entry event's REST Response fields
| Param | Description |
|---|---|
response |
The instance of System.RestResponse to log |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setTimestamp(Datetime timestamp) → LogEntryEventBuilderThis is only intended to be used internally by Nebula Logger, and is subject to change.
| Param | Description |
|---|---|
timestamp |
Datetime instance to set timestamp fields on this.logEntryEvent |
Type
LogEntryEventBuilder
Description
The same instance of LogEntryEventBuilder, useful for chaining methods
setTopics(List<String> tags) → LogEntryEventBuilderDeprecated - use addTags(List<String> tags) instead. This method will be removed in a future release
| Param | Description |
|---|---|
tags |
A list of tags |
Type
LogEntryEventBuilder
Description
An instance of LogEntryEventBuilder with the given topics / tags.
shouldSave() → BooleanDetermines if this instance of LogEntryEventBuilder should be saved the next time that Logger.saveLog() is called
Type
Boolean
Description
A boolean set to true if the log entries should be saved.
LoggingContext(String loggerVersionNumber,String organizationApiVersion,String organizationDomainUrl,String requestId,System.Quiddity systemMode,String transactionId)currentEntryScenario → StringentryNumber → IntegerloggerVersionNumber → StringorganizationApiVersion → StringorganizationDomainUrl → StringrequestId → StringsystemMode → System.QuidditytransactionId → StringuserLoggingLevel → System.LoggingLevel