NebulaLogger

The most robust logger for Salesforce. Works with Apex, Lightning Components, Flow, Process Builder & Integrations. Designed for Salesforce admins, developers & architects.

View the Project on GitHub jongpie/NebulaLogger

LogManagementDataSelector class

Selector class used for all queries that are specific to the log management layer


Methods

getAll(Schema.SObjectType sobjectType, Set<String> fieldNames)List<SObject>

Dynamically queries & returns all records in the specified SObjectType

Parameters
Param Description
sobjectType The SObjectType to query
fieldNames Set&lt;String&gt; API names of any fields to include in the query
Return

Type

List<SObject>

Description

List&lt;SObject&gt; containing any records in the specified SObjectType

getApexClasses(Set<String> apexClassNames)List<ApexClass>

Returns a list of ApexClass records

Parameters
Param Description
apexClassNames The names of the Apex classes to query
Return

Type

List<ApexClass>

Description

List&lt;ApexClass&gt; containing any matching records

getApexTriggers(Set<String> apexTriggerNames)List<ApexTrigger>

Returns a list of ApexTrigger records

Parameters
Param Description
apexTriggerNames The names of the Apex triggers to query
Return

Type

List<ApexTrigger>

Description

List&lt;ApexTrigger&gt; containing any matching records

getById(Schema.SObjectType sobjectType, Set<String> fieldNames, List<Id> recordIds)List<SObject>

Dynamically queries & returns records in the specified SObjectType based on the specified record IDs

Parameters
Param Description
sobjectType The SObjectType to query
fieldNames Set&lt;String&gt; API names of any fields to include in the query
recordIds List&lt;Id&gt; of record IDs to include in the query results
Return

Type

List<SObject>

Description

List&lt;SObject&gt; containing any matching records in the specified SObjectType

getCachedApexEmailNotifications()List<ApexEmailNotification>

Returns a cached copy of the ApexEmailNotification records in the org

Return

Type

List<ApexEmailNotification>

Description

The cached List&lt;ApexEmailNotification&gt; records

getCachedRecentLogWithApiReleaseDetails()Log__c

Returns a cached Log__c record that has been created within the last 4 hours that has API details populated from calling https://api.status.salesforce.com

Return

Type

Log__c

Description

The cached Log__c record, or null if no match is found

getCountOfAsyncApexJobs(String apexClassName, String apexMethodName, List<String> jobStatuses)Integer

Returns the count of AsyncApexJob records with the specified Apex class name, method name & job status

Parameters
Param Description
apexClassName The fully-qualified name of the Apex class associated with AsyncApexJob
apexMethodName The specific method (if any) within the Apex class associated with AsyncApexJob
jobStatuses The list of job statuses that should be used to filter AsynxApexJob records
Return

Type

Integer

Description

The Integer count of matching AsynxApexJob records

getCountOfRelatedRecordLogEntries(Id recordId)Integer

Returns the count of LogEntry__c records related to the specified record ID

Parameters
Param Description
recordId The ID to use for filtering LogEntry__c records
Return

Type

Integer

Description

The Integer count of matching LogEntry__c records

getDeleteableUserRecordAccess(List<Id> recordIds)List<UserRecordAccess>

Returns the list of UserRecordAccess records for any of the specified record IDs that the current user can delete

Parameters
Param Description
recordIds The list of ID for records to be deleted
Return

Type

List<UserRecordAccess>

Description

The matching List&lt;UserRecordAccess&gt; records

getFlowDefinitionViewsByFlowApiName(List<String> flowApiNames)List<FlowDefinitionView>

Returns a list of FlowDefinitionView records

Parameters
Param Description
flowApiNames The names of the Apex classes to query
Return

Type

List<FlowDefinitionView>

Description

List&lt;FlowDefinitionView&gt; containing any matching records

getFlowVersionViewsByDurableId(List<String> durableIds)List<FlowVersionView>

Returns a list of FlowVersionView records description

Parameters
Param Description
durableIds The durable IDs of the Flows to query
Return

Type

List<FlowVersionView>

Description

List&lt;FlowDefinitionView&gt; containing any matching records

getInstance()LogManagementDataSelector

The instance LogManagementDataSelector used for any querying specific to the log management layer

Return

Type

LogManagementDataSelector

Description

The singleton instance of LogManagementDataSelector

getLogById(Id logId)Log__c

Returns a Log__c record

Parameters
Param Description
logId The ID of the Log__c record to query
Return

Type

Log__c

Description

The matching Log__c record

getLogEntriesByLogId(Id logId)List<LogEntry__c>

Returns a List&lt;LogEntry__c&gt; records for the specified Log__c ID

Parameters
Param Description
logId The ID of the Log__c record of the LogEntry__c records to query
Return

Type

List<LogEntry__c>

Description

The matching List&lt;LogEntry__c&gt; records

getLogEntryById(Id logEntryId)LogEntry__c

Returns a LogEntry__c record

Parameters
Param Description
logEntryId The ID of the LogEntry__c record to query
Return

Type

LogEntry__c

Description

The matching LogEntry__c record

getLoggerScenariosById(List<Id> logScenarioIds)List<LoggerScenario__c>

Returns a List&lt;LoggerScenario__c&gt; of records with the specified log scenario IDs

Parameters
Param Description
logScenarioIds The list of ID of the Log__c records to query
Return

Type

List<LoggerScenario__c>

Description

The list of matching LoggerScenario__c records

getLogsById(List<Id> logIds)List<Log__c>

Returns a Log__c record and its related LogEntry__c records

Parameters
Param Description
logIds The list of ID of the Log__c records to query
Return

Type

List<Log__c>

Description

The list of matching Log__c records

getLogsByTransactionId(List<String> transactionIds)List<Log__c>

Returns a List&lt;Log__c&gt; of records with the specified transaction IDs

Parameters
Param Description
transactionIds The list of String transaction IDs of the Log__c records to query
Return

Type

List<Log__c>

Description

The list of matching Log__c records

getLogsWithoutParentLogByParentTransactionId(List<String> parentTransactionIds)List<Log__c>

Returns a List&lt;Log__c&gt; of records with the specified parent transaction IDs and a null value in ParentLog__c

Parameters
Param Description
parentTransactionIds The list of String parent transaction IDs of the Log__c records to query
Return

Type

List<Log__c>

Description

The list of matching Log__c records

getProfilesById(List<Id> profileIds)List<Schema.Profile>

Returns a List&lt;Schema.Profile&gt; of records with the specified profile IDs

Parameters
Param Description
profileIds The list of ID of the Schema.Profile records to query
Return

Type

List<Schema.Profile>

Description

The list of matching Schema.Profile records

getProfilesByNameSearch(String searchTerm)List<Schema.Profile>

Returns a List&lt;Schema.Profile&gt; of records where the profile's names partially matches the specified search term

Parameters
Param Description
searchTerm The String search term to use for searching Schema.Profile records
Return

Type

List<Schema.Profile>

Description

The list of matching Schema.Profile records

getQueuesByDeveloperName(List<String> queueDeveloperNames)List<Schema.Group>

Returns a List&lt;Schema.Group&gt; of records with the specified developer names and type == 'Queue'

Parameters
Param Description
queueDeveloperNames The list of String queue developer names to query
Return

Type

List<Schema.Group>

Description

The list of matching Schema.Group records

getRecordLogEntries(Id recordId, String fieldsClause, String orderByClause, Integer rowLimit)List<LogEntry__c>

Returns the list of LogEntry__c records related to the specified record ID

Parameters
Param Description
recordId The ID to use for filtering LogEntry__c records
fieldsClause A comma-separated String of field API names to include in the query
orderByClause A comma-separated String of field API names to use for sorting the query results
rowLimit The maximum number of records to return
Return

Type

List<LogEntry__c>

Description

The list of matching LogEntry__c records

getTagsByName(Set<String> tagNames)List<LoggerTag__c>

Returns a list of LoggerTag__c records with one of the specified tag names

Parameters
Param Description
tagNames The set of String tag names to query
Return

Type

List<LoggerTag__c>

Description

The list of matching LoggerTag__c records

getTopicsByName(Set<String> topicNames)List<Schema.Topic>

Returns a list of Schema.Topic records with one of the specified topic names

Parameters
Param Description
topicNames The set of String topic names to query
Return

Type

List<Schema.Topic>

Description

The list of matching Schema.Topic records

getUsersById(List<Id> userIds)List<Schema.User>

Returns a List&lt;Schema.User&gt; of records with the specified user IDs

Parameters
Param Description
userIds The list of ID of the Schema.User records to query
Return

Type

List<Schema.User>

Description

The list of matching Schema.User records

getUsersByNameSearch(String searchTerm)List<Schema.User>

Returns a List&lt;Schema.User&gt; of records where the User's names or username partially matches the specified search term

Parameters
Param Description
searchTerm The String search term to use for searching Schema.User records
Return

Type

List<Schema.User>

Description

The list of matching Schema.User records

getUsersByUsername(List<String> usernames)List<Schema.User>

Returns a List&lt;Schema.User&gt; of records with the specified usernames (Schema.User.Username)

Parameters
Param Description
usernames The list of String user usernames to query
Return

Type

List<Schema.User>

Description

Tje list of matching Schema.User records