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

LoggerSettingsController class

Controller class for lwc loggerSettings, used to manage records in LoggerSettings__c


Methods

canUserModifyLoggerSettings()Boolean

Indicates if the current user has access to modify LoggerSettings__c records, based on either object-level access on LoggerSettings__c, or access to the custom permission CanModifyLoggerSettings

Return

Type

Boolean

Description

return description

createRecord()LoggerSettings__c

Creates a new, unsaved LoggerSettings__c record

Return

Type

LoggerSettings__c

Description

A new LoggerSettings__c record, with all fields populated with default values

deleteRecord(LoggerSettings__c settingsRecord)void

Deletes the specified LoggerSettings__c record

Parameters
Param Description
settingsRecord The record to delete

getOrganization()Schema.Organization

Returns the Schema.Organization record for the current environment

Return

Type

Schema.Organization

Description

The current environment's Schema.Organization record

getPicklistOptions()LoggerSettingsPicklistOptions

Returns all of the List<PicklistOption> used in the frontend for displaying certain text fields as picklist fields

Return

Type

LoggerSettingsPicklistOptions

Description

The instance of LoggerSettingsPicklistOptions, containing all picklist options for any fields treated as picklists

getRecords()List<SettingsRecordResult>

Returns all existing LoggerSettings__c records as instances of SettingsRecordResult

Return

Type

List<SettingsRecordResult>

Description

The list of existing records

saveRecord(LoggerSettings__c settingsRecord)void

Upserts the specified LoggerSettings__c record

Parameters
Param Description
settingsRecord The record to save

searchForSetupOwner(String setupOwnerType, String searchTerm)List<SetupOwnerSearchResult>

searchForSetupOwner description

Parameters
Param Description
setupOwnerType The object to search (Schema.Profile or Schema.User)
searchTerm The search term to use when searching records
Return

Type

List<SetupOwnerSearchResult>

Description

The list of SetupOwnerSearchResult, based on any matching SObject records


Inner Classes

LoggerSettingsController.LoggerSettingsPicklistOptions class

Inner class for returning all custom List&lt;PicklistOption&gt; in a single Apex method call


Properties
loggingLevelOptionsList<PicklistOption>
platformEventStorageLocationOptionsList<PicklistOption>
purgeActionOptionsList<PicklistOption>
saveMethodOptionsList<PicklistOption>
setupOwnerTypeOptionsList<PicklistOption>
shareAccessLevelOptionsList<PicklistOption>

LoggerSettingsController.PicklistOption class

Inner DTO class for picklist options since Schema.PicklistEntry isn't supported for aura-enabled methods


Properties
labelString
valueString

LoggerSettingsController.SettingsRecordResult class

Inner class used for sorting LoggerSettings__c, used for 3 reasons: 1. Trying to sort in SOQL on SetupOwner.Type, SetupOwner.Name results in only user-specific records being returned (no idea why - seems like a bug) 2. Records tied to profiles do not return the actual profile name in SetupOwner.Name - example: System Admin returns as 'PT1' in query results 3. Records tied to the org or profiles return unhelpful values in SetupOwner.Type - org returns '00D', profiles return '00e'


Properties
createdByUsernameString
lastModifiedByUsernameString
recordLoggerSettings__c
setupOwnerNameString
setupOwnerTypeString

Methods
compareTo(Object compareTo)Integer

Implements sorting logic for the Comparable interface

####### Parameters

Param Description
compareTo The object to compare to when sorting the current item

####### Return

Type

Integer

Description

The sorting result


LoggerSettingsController.SetupOwnerSearchResult class

Inner class used for returning search results for Schema.Profile and Schema.User records


Properties
iconString
imageString
labelString
recordIdId
secondaryLabelString