New 'Logger Settings' lwc/tab
LoggerSettings__c
have been renamed in this release:
AnonymousMode__c
→IsAnonymousModeEnabled__c
ApplyDataMaskRules__c
→IsDataMaskingEnabled__c
IsComponentConsoleLoggingEnabled__c
→IsJavaScriptConsoleLoggingEnabled__c
New 'Logger Settings' lwc/tab
PR #254 introduces a new lwc, loggerSettings
, as a tab in the Logger Console app. It provides several features for managing LoggerSettings__c
records:
-
Provides a datatable of all
LoggerSettings__c
records, along with functionality to view, create, edit and delete records. Anyone with access to the tab/lwc can see the datatable and the 'View' row action - but in order to access/use the 'New' button (create), and the 'Edit' & 'Delete' row actions, users must either have update access on theLoggerSettings__c
object(LoggerSettings__c.SObjectType.getDescribe().isUpdateable()
), or have the custom permission 'Can Modify Logger Settings' (FeatureManagement.checkPermission('CanModifyLoggerSettings')
). This is useful for orgs where people may have theLoggerAdmin
permission set, but aren't full System Admins.- The
LoggerAdmin
permission set has access to view, create, edit, and delete - The
LoggerLogViewer
permission set only has access to view - The
LoggerLogCreator
andLoggerEndUser
permission sets do not have access to the tab/lwc
- The
-
Provides picklist-style inputs for fields that really should be picklists. Custom settings objects do not support several field types, including picklists - instead, text fields are used on the object, but this can lead to bad config data being entered (e.g., an admin/developer mistypes the name of a
LoggingLevel
orLogger.SaveMethod
enum value. The lwc solves this by presenting these fields as picklists, using some Apex in theLoggerSettingsController
class to generate the list of picklist options. This prevants any isssues with tpyos, and it simplifies the configuration process for admins/developers -
Bonus unexpected feature: using this component, you can now configure
LoggerSettings__c
for the the Automated Process user. When using the standard UI for custom settings, you cannot search for/select the Automated Process user, but it apparently works just fine when the settings record is created via Apex
Other LWC Changes
- Added icon on
logEntryEventStream
, fixed some issues with unresolved Promises in jest tests - Improved jest tests for
logViewer
component
Documentation Enhancements
- Added JSDoc comments the 2 classes in the lwc
logger.js
:Logger
andLogEntryBuilder
. JSDoc comments have also been incorporated into the GitHub Pages site will now include these docs going forward (alongside the existing Apex docs) - Cleaned up some ApexDoc comments in various classes for better clarity
Pipeline Enhancements
- Made the pipeline faster by adding caching in the pipeline for
sfdx-cli
- Automated org type testing by updating the pipeline to deploy to 2 different scratch orgs (in parallel) to confirm the metadata works in 2 contexts:
- A base scratch org - an Enterprise Edition org with Chatter enabled, and Experience Cloud disabled
- An Experience Cloud scratch org - this is the same as the base org, but also has Experience Cloud enabled, with 1 site created
- pipeline uses 2 scratch orgs now to cover different scenarios
Thanks so much to @jamessimone for a ton of help on this release! 🥳