-
-
Notifications
You must be signed in to change notification settings - Fork 230
Add overloads to Logger.logDatabaseErrors() to accept List<SObject> #942
Copy link
Copy link
Open
Labels
Layer: Log ManagementItems related to the custom objects & Logger Console appItems related to the custom objects & Logger Console appLayer: Logger EngineItems related to the core logging engineItems related to the core logging engineLogging Source: ApexItems related to using Logger within ApexItems related to using Logger within ApexSalesforce Feature: ReportingAnything related to reports, dashboards, and the underlying data modelAnything related to reports, dashboards, and the underlying data modelType: EnhancementNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
Layer: Log ManagementItems related to the custom objects & Logger Console appItems related to the custom objects & Logger Console appLayer: Logger EngineItems related to the core logging engineItems related to the core logging engineLogging Source: ApexItems related to using Logger within ApexItems related to using Logger within ApexSalesforce Feature: ReportingAnything related to reports, dashboards, and the underlying data modelAnything related to reports, dashboards, and the underlying data modelType: EnhancementNew feature or requestNew feature or request
Currently, there are several overloads for
Logger.logDatabaseErrors()to log only error instances of any of the variousDatabaseresult classes. But the result classes themselves don't have any info about the actual record, other than possibly the record ID (which will be blank oninsert).To help give more context to the
Databaseresults, there should be overrides forLogger.logDatabaseErrors()to pass in the list ofSObjectrecordsresults[0]will be forrecords[0], etc.)resultsToLog, which is internally passed tosetDatabaseResult().setRecord()(alongside the existing call tosetDatabaseResult()