Dealing with Salesforce Maximum Debug Log Size
When working with Apex code that iterates a lot, you may encounter a truncated log. The error looks like this: MAXIMUM DEBUG LOG SIZE REACHED At the time of writing, the maximum allowed size for a debug log is 2 MB. The default monitoring level for Apex code includes a lot of clutter you usually don’t need (like METHOD_ENTRY, METHOD_EXIT). By common practice, you should put a log filter on the monitored user, or on the classes involved in the transaction by using an override flag. ...