Skip to content

Added setRecord() Overload for List<Id> and Set<Id> Parameters

Compare
Choose a tag to compare
@jongpie jongpie released this 07 Nov 20:33
· 5 commits to main since this release
1b437ce

Thanks to @alanjaouen for working on these changes & @jamessimone for reviewing! (See PR #792)

Core Unlocked Package Changes

Added a new overload setRecord(System.Iterable<Id> recordsIds) in LogEntryEventBuilder to make it easy to log instances of List<Id> and Set<Id>. Nebula Logger automatically sets details about the logged IDs on LogEntry__c, just as it does when calling the method overloads setRecord(SObject record), setRecord(List<SObject> records), and setRecord(Id recordId)

Example usage:

// Use List<Id>
List<Id> userIdList = new List<Id>{ System.UserInfo.getUserId() };
Logger.info('Example entry that uses List<Id>').setRecord(userIdList);

// Use Set<Id>
Set<Id> userIdSet = new Set<Id>{ System.UserInfo.getUserId() };
Logger.info('Example entry that uses Set<Id>').setRecord(userIdSet);

Installation Info

Core Unlocked Package - no namespace

Full Changelog: v4.14.17...v4.14.18