v4.7.0 - Spring '22 Release
LoggerSettings__c
have been added - IsSavingEnabled__c
and IsPlatformEventStorageEnabled__c
- that will prevent logs from being saved until you update the values. When deploying new checkbox (boolean) fields, Salesforce automatically sets the value to false
, even if the field's default value has true
specified. You can easily update these values using the tab "Logger Settings", available via the Logger Console app - it's recommended that both fields are set to true
.
New Features for LoggerSettings__c
- Closed #258 by adding 2 new
LoggerSettings__c
fields to provide control over platform events & custom objectsIsSavingEnabled__c
- when disabled, any calls to Logger.saveLog() are ignored. This allows you to still use Logger for outputting Apex debug statements, but it completely disables saving/publishing of the platform eventLogEntryEvent__e
.IsPlatformEventStorageEnabled__c
- this fields controls ifLogEntryEvent__e
platform events are transformed & stored in the custom objectsLog__c
andLogEntry__c
(whenIsSavingEnabled__c
== true).
- Closed #279 by adding some new features for "log scenarios"
- Configure a default scenario by setting the new field
LoggerSettings__c.DefaultLogScenario__c
- Retrieve the current transaction's scenario in Apex using new method
Logger.getScenario()
- Configure a default scenario by setting the new field
- Added the ability to assign a default
OwnerId
for newLog__c
records via a new settings field,LoggerSettings__c.DefaultLogOwner__c
. This is useful for orgs that assign/manage logs for triage purposes (often done in production environments for managing logs with errors & warnings) and want more control over who is assigned as the log owner. The setting can be configured with 1 of 5 possible values- Blank (null) - this will provide the same behavior that has existed in previous releases - the
Log__c
record will simply be assigned to the user that generated the log - User ID
- Username
- Queue ID
- Queue DeveloperName
- Blank (null) - this will provide the same behavior that has existed in previous releases - the
- Renamed
LoggerSettings__c
fieldStripInaccessibleRecordFields__c
toIsRecordFieldStrippingEnabled__c
for a consistent field naming convention - Updated lwc
loggerSettings
andlogEntryEventStream
to support using a namespace when running in the managed package by introducing a new Apex class,LoggerSObjectMetadata
. This class provides LWCs with info aboutSObject
,SObjectField
, andPicklistEntry
metadata (including details about a namespace, when applicable). - Bumped all metadata to API v54.0 (Spring '22 release)
- Added picklist values in
Log__c.ApiVersion__c
for all 3 API versions in calendar year 2022 - Closed #15 and closed #195 by expanding wiki content. Changes for the wiki are managed in a separate repo, so this PR doesn't contain the changes, but the wiki updates have been done in parallel
New Features for Log__c
Quick Action "Open Viewer" (formerly "View JSON")
- Renamed the lwc
logJSON
back tologViewer
. This change only impacts the unlocked package. - Renamed the quick action "View JSON" (again) to "Open Viewer"
- Enhanced
logViewer
lwc to display tabs for both JSON (existing) and log file (new). The new 'log file' view displays the log's related log entries in a streamlined view that includes each entry's timestamp, logging level, message, and stack trace - Added a new download button to
logViewer
to export the selected content to a file
Bugfixes
- Fixed #271 - Updated
LoggerTestUtils
to use the current user's profile in most cases, instead of trying to query for a particular profile. For testing behavior related to profiles without access to Logger, integration tests have been added to theextra-tests
folder that still leverage the 'Standard User' profile in a scratch org, but these tests are not included in the package. - Fixed #272 by explicitly declaring the list as
List<Schema.PicklistEntry>
instead of justList<PicklistEntry>
- Fixed #276 by updating
LoggerEmailUtils
to check if email deliverability is enabled in the current org prior to attempting to send any emails - Wrapped all dynamic query strings in
String.escapeSingleQuotes()
as a security best practice & to avoid PMD reporting errors forApexSOQLInjection
Pipeline / DevOps
- Updated pipeline to use JWT bearer flow + sfdx bot user for dev hub auth
- Updated the Experience Cloud scratch definition to use Spanish as the language/Spain as the country as another way to monitor/test for any language-related issues in the pipeline
- Cleaned up some PMD rule suppressions
- Added basic Experience Cloud site to the pipeline to provide a better method of testing Experience Cloud scenarios (the site is not included in the package itself - it's only used in the pipeline). Previously, the pipeline created an Experience Cloud site via the async function
sfdx force:community:create
+ a 2 minute delay, but the async operation is inconsistent in how long it takes to complete. By deploying the site metadata in the pipeline, it becomes a synchronous operation, which should prevent some inconsistent pipeline failures. - Updated/added some
devDependencies
inpackage.json
to handle some dependabot alerts - Closed #263 by adding
"ancestorVersion": "HIGHEST"
in the managed package'ssfdx-project.json
file
New Managed Package Release
- For orgs that are still using the managed package, this version contains all of the changes made between
v4.6.0
andv4.7.0
. Check out the v4.7.0 Milestone to see all of the new features & bugfixes
View v4.7.0 Milestone
View v4.7.0 Full Changelog from v4.6.0