You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the facility exists to link logs together using a call to Logger.getTransactionId() but all this does is populate a lookup field on every successive log record to the initial log record.
Batch Apex is intended for large volumes of records and the system generates N+2 Log records where N is the number of batches processed so when processing large numbers of batches you get lots of Log records. Tracing progress of the entire batch execution requires inspection of every log record and each log record's child log entries in turn.
Diagnosing issues with batch execution would be much easier if it was possible to have a single log record and for every logger.info/warn/error call create a child log entry record under that single log record
The text was updated successfully, but these errors were encountered:
Hi @stephenpstanley - I love the idea of having a way to more easily see all log entries generated by a batchable or queueable job, but I don't think I want to do it by creating a single Log__c. The goal of Log__c is to represent a single Apex transaction, so having a single Log__c record that represents multiple transactions (from the batchable or queueable job) breaks some design & reporting concepts. I'll try prototyping some ideas to see if there other possible solutions that would still provide easy access to all logging data for a specific job.
Understood. I've got a bit of a workaround using a custom report that groups by the parent log ID, but it's not ideal as it's hard to use from mobile. Problems that need to be analysed tend to crop up in the evenings when I'd rather look at it without having to fire up my laptop!
New Feature Summary
Currently the facility exists to link logs together using a call to Logger.getTransactionId() but all this does is populate a lookup field on every successive log record to the initial log record.
Batch Apex is intended for large volumes of records and the system generates N+2 Log records where N is the number of batches processed so when processing large numbers of batches you get lots of Log records. Tracing progress of the entire batch execution requires inspection of every log record and each log record's child log entries in turn.
Diagnosing issues with batch execution would be much easier if it was possible to have a single log record and for every logger.info/warn/error call create a child log entry record under that single log record
The text was updated successfully, but these errors were encountered: