New Release v4.7.2 - Bugfix for setting parent log transaction IDs, new Async Failures Additions plugin #312
jongpie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Core Package Changes
Log__c.ParentLogTransactionId__c
and updated trigger handler logic to optionally setLog__c.ParentLog__c
when the parent log is found (or skips it when the parent log is not found)Log__c
flexipage and page layout now use a new formula fieldLog__c.ParentLogLink__c
to display either a link toParentLog__c
when set or the text value ofParentLogTransactionId__c
LoggerLogCreator
to indicate that it's currently optional, but might be needed in the futureLogEntryEventHandler.TAG_ASSIGNMENT_RULES
by adding lazy-loading (discussed in Reducing use of SOQL in synchronous context #303) and adding a check onLogEntryTagRule__mdt.getAll().isEmpty() == true
to minimize the usage of querying onLogEntryTagRule__mdt
Logger_Tests
, and added TODOs for several test methods that will eventually be rewritten in a future release@SuppressWarnings
annotations in a couple of Apex classes-LoggerMockDataCreator.createAggregateResult(Map<String, Object>)
since the current mocking approach doesn't/can't actually set any fields on the mockAggregateResult
LoggerSObjectHandler__mdt.SObjectTypeOverride__c
as a way to support triggers on objects that are not supported viaEntityDefinition
lookupsNew Async Failures Additions Plugin
@jamessimone created a new plugin (implemented in #309), this plugin adds support for logging asynchronous batchable and queueable exceptions.
Batchable Error Logging
All a batch class needs to do is implement the marker
Database.RaisesPlatformEvents
interface and create aLoggerParameter__mdt
record where theValue
field matches the name of the batch class you are looking to add logging for, and the DeveloperName (the "Name" field) starts withBatchError
:And the CMDT record:
Once you've correctly configured those two things (the marker interface
Database.RaisesPlatformEvents
on the Apex batchable class, and the Logger Parameter CMDT record), your class will now log any uncaught exceptions that cause that batch class to fail unexpectedly.Queueable Error Logging
If you have Apex classes that implement
System.Queueable
, you can add error logging with some minimal code additions:If you'd like to do additional processing, you can alternatively choose to extend
LogFinalizer
:Promoted All Plugin Packages
Previously, the package plugins had not been promoted, which prevented them from being installed directly into production. The most recent package versions for each plugin has now been promoted, allowing all plugins to now be installed into production. At the moment, there are 5 plugins available:
Note that several plugins are still considered to be in beta - the code has been tested and everything is expected to work in production, but as some plugins are relatively new, there may be some bigger changes between releases (depending on community feedback about new features & bugfixes).
Pipeline Changes
CODEOWNERS
filebuild.yml
so that the managed package build is a dependency for creating the unlocked package. This will add more time to the build, but it will ensure that the managed package (the more problematic package) can be created before creating the unlocked packageREADME.md
package.json
& recreatingpackage-lock.json
This discussion was created from the release Bugfix for setting parent log transaction IDs, new Async Failures Additions plugin.
Beta Was this translation helpful? Give feedback.
All reactions